Class: RubyHeaderParser::TyperefDefinition
- Inherits:
-
Object
- Object
- RubyHeaderParser::TyperefDefinition
- Defined in:
- lib/ruby_header_parser/typeref_definition.rb
Overview
typeref definition for FunctionDefinition
Instance Attribute Summary collapse
-
#pointer ⇒ Symbol?
:ref, :raw.
- #type ⇒ String
Instance Method Summary collapse
- #==(other) ⇒ Boolean
-
#initialize(type:, pointer: nil) ⇒ TyperefDefinition
constructor
A new instance of TyperefDefinition.
- #pointer? ⇒ Boolean
Constructor Details
#initialize(type:, pointer: nil) ⇒ TyperefDefinition
Returns a new instance of TyperefDefinition.
16 17 18 19 |
# File 'lib/ruby_header_parser/typeref_definition.rb', line 16 def initialize(type:, pointer: nil) @type = type @pointer = pointer end |
Instance Attribute Details
#pointer ⇒ Symbol?
Returns :ref, :raw.
12 13 14 |
# File 'lib/ruby_header_parser/typeref_definition.rb', line 12 def pointer @pointer end |
#type ⇒ String
8 9 10 |
# File 'lib/ruby_header_parser/typeref_definition.rb', line 8 def type @type end |
Instance Method Details
#==(other) ⇒ Boolean
28 29 30 |
# File 'lib/ruby_header_parser/typeref_definition.rb', line 28 def ==(other) other.is_a?(TyperefDefinition) && type == other.type && pointer == other.pointer end |
#pointer? ⇒ Boolean
22 23 24 |
# File 'lib/ruby_header_parser/typeref_definition.rb', line 22 def pointer? !!pointer end |