Class: BEL::Language::StatementGroup
- Inherits:
-
Struct
- Object
- Struct
- BEL::Language::StatementGroup
- Includes:
- Quoting
- Defined in:
- lib/bel/language.rb
Constant Summary
Constants included from Quoting
Quoting::KeywordMatcher, Quoting::NonWordMatcher
Instance Attribute Summary collapse
-
#annotations ⇒ Object
Returns the value of attribute annotations.
-
#name ⇒ Object
Returns the value of attribute name.
-
#statements ⇒ Object
Returns the value of attribute statements.
Instance Method Summary collapse
- #<=>(other_group) ⇒ Object
- #to_bel ⇒ Object (also: #to_s)
Methods included from Quoting
#always_quote, #ensure_quotes, #quotes_required?, #remove_quotes
Instance Attribute Details
#annotations ⇒ Object
Returns the value of attribute annotations
106 107 108 |
# File 'lib/bel/language.rb', line 106 def annotations @annotations end |
#name ⇒ Object
Returns the value of attribute name
106 107 108 |
# File 'lib/bel/language.rb', line 106 def name @name end |
#statements ⇒ Object
Returns the value of attribute statements
106 107 108 |
# File 'lib/bel/language.rb', line 106 def statements @statements end |
Instance Method Details
#<=>(other_group) ⇒ Object
109 110 111 112 113 114 115 |
# File 'lib/bel/language.rb', line 109 def <=>(other_group) if not other_group || other_group.is_a? 1 else (statements || []) <=> (other_group.statements || []) end end |
#to_bel ⇒ Object Also known as: to_s
117 118 119 |
# File 'lib/bel/language.rb', line 117 def to_bel %Q{SET STATEMENT_GROUP = #{ensure_quotes(self.name)}} end |