Class: EndecaOnDemand::Response::Property
- Includes:
- PP
- Defined in:
- lib/endeca_on_demand/response/property.rb
Instance Attribute Summary collapse
-
#parent ⇒ Object
readonly
fields ##.
Attributes inherited from Proxy
Instance Method Summary collapse
-
#class ⇒ Object
override proxy ##.
-
#initialize(parent, xml) ⇒ Property
constructor
A new instance of Property.
- #inspect ⇒ Object
- #inspect_attributes ⇒ Object
-
#label ⇒ Object
data ##.
- #value ⇒ Object (also: #to_s, #to_param)
Methods included from PP
Constructor Details
#initialize(parent, xml) ⇒ Property
Returns a new instance of Property.
15 16 17 |
# File 'lib/endeca_on_demand/response/property.rb', line 15 def initialize(parent, xml) @parent, @xml = parent, xml end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class EndecaOnDemand::Proxy
Instance Attribute Details
#parent ⇒ Object (readonly)
fields ##
13 14 15 |
# File 'lib/endeca_on_demand/response/property.rb', line 13 def parent @parent end |
Instance Method Details
#class ⇒ Object
override proxy ##
21 22 23 |
# File 'lib/endeca_on_demand/response/property.rb', line 21 def class EndecaOnDemand::Response::Property end |
#inspect ⇒ Object
9 |
# File 'lib/endeca_on_demand/response/property.rb', line 9 def inspect; "#{label}: #{value.inspect}"; end |
#inspect_attributes ⇒ Object
7 |
# File 'lib/endeca_on_demand/response/property.rb', line 7 def inspect_attributes; [ :label, :value ]; end |
#label ⇒ Object
data ##
29 30 31 |
# File 'lib/endeca_on_demand/response/property.rb', line 29 def label xml.name.to_s.gsub(/^p_/, '') end |
#value ⇒ Object Also known as: to_s, to_param
33 34 35 |
# File 'lib/endeca_on_demand/response/property.rb', line 33 def value xml.content end |