Class: BEL::Language::Annotation
- Inherits:
 - 
      Struct
      
        
- Object
 - Struct
 - BEL::Language::Annotation
 
 
- 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
- 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute name.
 - 
  
    
      #value  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute value.
 
Instance Method Summary collapse
- #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
#name ⇒ Object
Returns the value of attribute name
      92 93 94  | 
    
      # File 'lib/bel/language.rb', line 92 def name @name end  | 
  
#value ⇒ Object
Returns the value of attribute value
      92 93 94  | 
    
      # File 'lib/bel/language.rb', line 92 def value @value end  | 
  
Instance Method Details
#to_bel ⇒ Object Also known as: to_s
      95 96 97 98 99 100 101 102 103  | 
    
      # File 'lib/bel/language.rb', line 95 def to_bel if self.value.respond_to? :each value = self.value.map {|v| quote(v)} value = "{#{value.join(',')}}" else value = quote_if_needed(self.value) end "SET #{self.name} = #{value}" end  |