Class: BEL::Language::StatementGroup

Inherits:
Struct
  • Object
show all
Includes:
Quoting
Defined in:
lib/bel/language.rb

Constant Summary

Constants included from Quoting

Quoting::KeywordMatcher, Quoting::NonWordMatcher

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Quoting

#always_quote, #ensure_quotes, #quotes_required?, #remove_quotes

Instance Attribute Details

#annotationsObject

Returns the value of attribute annotations

Returns:

  • (Object)

    the current value of annotations



106
107
108
# File 'lib/bel/language.rb', line 106

def annotations
  @annotations
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



106
107
108
# File 'lib/bel/language.rb', line 106

def name
  @name
end

#statementsObject

Returns the value of attribute statements

Returns:

  • (Object)

    the current value of 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_belObject 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