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::Keywords, Quoting::LenientQuotedMatcher, Quoting::NonWordMatcher, Quoting::QuoteNotEscapedMatcher, Quoting::StrictQuotedMatcher
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, #identifier_value?, #quote, #quote_if_needed, #quoted?, #quotes_required?, #remove_quotes, #string_value?, #unquote, #unquoted?
Instance Attribute Details
#annotations ⇒ Object
Returns the value of attribute annotations
116 117 118 |
# File 'lib/bel/language.rb', line 116 def annotations @annotations end |
#name ⇒ Object
Returns the value of attribute name
116 117 118 |
# File 'lib/bel/language.rb', line 116 def name @name end |
#statements ⇒ Object
Returns the value of attribute statements
116 117 118 |
# File 'lib/bel/language.rb', line 116 def statements @statements end |
Instance Method Details
#<=>(other_group) ⇒ Object
119 120 121 122 123 124 125 |
# File 'lib/bel/language.rb', line 119 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
127 128 129 |
# File 'lib/bel/language.rb', line 127 def to_bel %Q{SET STATEMENT_GROUP = #{quote_if_needed(self.name)}} end |