Module: Qrb::Syntax::Attribute
- Defined in:
- lib/qrb/syntax/attribute.rb
Instance Method Summary collapse
Instance Method Details
#compile(factory) ⇒ Object
5 6 7 |
# File 'lib/qrb/syntax/attribute.rb', line 5 def compile(factory) factory.attribute(attribute_name.to_sym, type.compile(factory)) end |
#to_ast ⇒ Object
9 10 11 |
# File 'lib/qrb/syntax/attribute.rb', line 9 def to_ast [:attribute, attribute_name.to_s, type.to_ast] end |