Class: Gonzui::QueryItem
- Inherits:
-
Struct
- Object
- Struct
- Gonzui::QueryItem
- Defined in:
- lib/gonzui/searchquery.rb,
lib/gonzui/searchquery.rb
Instance Attribute Summary collapse
-
#phrase_p ⇒ Object
Returns the value of attribute phrase_p.
-
#property ⇒ Object
Returns the value of attribute property.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#phrase_p ⇒ Object
Returns the value of attribute phrase_p
13 14 15 |
# File 'lib/gonzui/searchquery.rb', line 13 def phrase_p @phrase_p end |
#property ⇒ Object
Returns the value of attribute property
13 14 15 |
# File 'lib/gonzui/searchquery.rb', line 13 def property @property end |
#value ⇒ Object
Returns the value of attribute value
13 14 15 |
# File 'lib/gonzui/searchquery.rb', line 13 def value @value end |
Instance Method Details
#phrase? ⇒ Boolean
26 27 28 |
# File 'lib/gonzui/searchquery.rb', line 26 def phrase? self.phrase_p == true end |
#to_s ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/gonzui/searchquery.rb', line 15 def to_s string = "" string << self.property.to_s << ":" if self.property if phrase? string << sprintf('"%s"', self.value.join(" ")) else string << self.value end return string end |