Module: Qrb::Syntax::SubType
- Defined in:
- lib/qrb/syntax/sub_type.rb
Instance Method Summary collapse
Instance Method Details
#compile(factory) ⇒ Object
5 6 7 8 9 |
# File 'lib/qrb/syntax/sub_type.rb', line 5 def compile(factory) s = rel_type.compile(factory) c = constraint_def.compile(factory) factory.subtype(s, c) end |
#to_ast ⇒ Object
11 12 13 |
# File 'lib/qrb/syntax/sub_type.rb', line 11 def to_ast [:sub_type, rel_type.to_ast] + constraint_def.to_ast end |