Sha256: c7d5eb83e146056ca803bae1e4afd7017ff4eed3106a3c108aecfd240a169ee4

Contents?: true

Size: 794 Bytes

Versions: 5

Compression:

Stored size: 794 Bytes

Contents

module EndecaOnDemand
  class Response
    class Breadcrumb
      class Bread < EndecaOnDemand::Proxy

        include EndecaOnDemand::PP

        def inspect_attributes; [ :options ]; end

        ## fields ##

        attr_reader :breadcrumb

        def initialize(breadcrumb, xml)
          @breadcrumb, @xml = breadcrumb, xml

          define_getters(:options)
        end

        ## override proxy ##

        def class
          EndecaOnDemand::Response::Breadcrumb::Bread
        end

        ##

        ## data ##

        def options
          @options ||= xml.children.inject({}) do |hash,child|
              hash.tap do
                hash[child.name] = child.content
              end
            end.symbolize_keys
        end

        ##
        
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
endeca_on_demand-1.3.4 lib/endeca_on_demand/response/breadcrumb/bread.rb
endeca_on_demand-1.3.3 lib/endeca_on_demand/response/breadcrumb/bread.rb
endeca_on_demand-1.3.2 lib/endeca_on_demand/response/breadcrumb/bread.rb
endeca_on_demand-1.3.1 lib/endeca_on_demand/response/breadcrumb/bread.rb
endeca_on_demand-1.3.0 lib/endeca_on_demand/response/breadcrumb/bread.rb