Class: Stark::Parser::AST::Struct
- Defined in:
- lib/stark/ast.rb,
lib/stark/raw_parser.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #accept(obj) ⇒ Object
-
#initialize(type, name, fields) ⇒ Struct
constructor
A new instance of Struct.
Constructor Details
#initialize(type, name, fields) ⇒ Struct
Returns a new instance of Struct.
487 488 489 490 491 |
# File 'lib/stark/raw_parser.rb', line 487 def initialize(type, name, fields) @type = type @name = name @fields = fields end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
494 495 496 |
# File 'lib/stark/raw_parser.rb', line 494 def fields @fields end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
493 494 495 |
# File 'lib/stark/raw_parser.rb', line 493 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
492 493 494 |
# File 'lib/stark/raw_parser.rb', line 492 def type @type end |
Instance Method Details
#accept(obj) ⇒ Object
18 19 20 |
# File 'lib/stark/ast.rb', line 18 def accept(obj) obj.process_struct self end |