Class: EndecaOnDemand::Proxy
- Inherits:
-
Object
- Object
- EndecaOnDemand::Proxy
- Defined in:
- lib/endeca_on_demand/proxy.rb
Direct Known Subclasses
Collection, Response, Response::AppliedFilters, Response::AppliedFilters::SearchReport, Response::AppliedFilters::SearchReport::Search, Response::AppliedFilters::SelectedDimensionValueId, Response::Breadcrumb, Response::Breadcrumb::Bread, Response::BusinessRulesResult, Response::BusinessRulesResult::BusinessRule, Response::Dimension, Response::Dimension::DimensionValue, Response::KeywordRedirect, Response::Property, Response::RecordsSet, Response::RecordsSet::Record
Instance Attribute Summary collapse
-
#xml ⇒ Object
Returns the value of attribute xml.
Instance Method Summary collapse
-
#inspect ⇒ Object
:nodoc:.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object (protected)
Default behavior of method missing should be to delegate all calls to the target of the proxy. This can be overridden in special cases.
34 35 36 |
# File 'lib/endeca_on_demand/proxy.rb', line 34 def method_missing(name, *args, &block) xml.send(name, *args, &block) end |
Instance Attribute Details
#xml ⇒ Object
Returns the value of attribute xml.
10 11 12 |
# File 'lib/endeca_on_demand/proxy.rb', line 10 def xml @xml end |
Instance Method Details
#inspect ⇒ Object
:nodoc:
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/endeca_on_demand/proxy.rb', line 12 def inspect # :nodoc: return super if not respond_to?(:inspect_attributes) or inspect_attributes.blank? attributes = inspect_attributes.reject { |x| begin attribute = send x attribute.blank? rescue NoMethodError true end }.map { |attribute| "#{attribute.to_s.sub(/_\w+/, 's')}=#{send(attribute).inspect}" }.join ' ' "#<#{self.class.name}:#{sprintf("0x%x", object_id)} #{attributes}>" end |