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.
490 491 492 493 494 |
# File 'lib/stark/raw_parser.rb', line 490 def initialize(type, name, fields) @type = type @name = name @fields = fields end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
497 498 499 |
# File 'lib/stark/raw_parser.rb', line 497 def fields @fields end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
496 497 498 |
# File 'lib/stark/raw_parser.rb', line 496 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
495 496 497 |
# File 'lib/stark/raw_parser.rb', line 495 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 |