Class: BEL::Language::DocumentProperty
- Inherits:
-
Struct
- Object
- Struct
- BEL::Language::DocumentProperty
- 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
20 21 22 |
# File 'lib/bel/language.rb', line 20 def name @name end |
#value ⇒ Object
Returns the value of attribute value
20 21 22 |
# File 'lib/bel/language.rb', line 20 def value @value end |
Instance Method Details
#to_bel ⇒ Object Also known as: to_s
28 29 30 31 32 33 34 35 36 |
# File 'lib/bel/language.rb', line 28 def to_bel property_value = if self.value.respond_to?(:each) self.value.map(&:to_s).join('|') else self.value.to_s end %Q{SET DOCUMENT #{self.name} = #{quote_if_needed(property_value)}} end |