Sha256: c03de13baf36874288da0f051b230a26438eb2a2951db2009295fce4976c7921

Contents?: true

Size: 460 Bytes

Versions: 18

Compression:

Stored size: 460 Bytes

Contents

module Netzke::Core
  # Represents the endpoint response at the server side.
  # An instance of it is passed as the second parameter to the +endpoint+ block.
  class EndpointResponse < ::Hash
    def method_missing(name, *params)
      if name.to_s =~ /(.+)=$/
        self[$1.to_sym] = params.first
      else
        self[name] = self.class.new if self[name].nil?
        self[name] = params if params.present?
        self[name]
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
netzke-core-0.12.3 lib/netzke/core/endpoint_response.rb
netzke-core-0.12.2 lib/netzke/core/endpoint_response.rb
netzke-core-0.12.1 lib/netzke/core/endpoint_response.rb
netzke-core-0.12.0 lib/netzke/core/endpoint_response.rb
netzke-core-0.12.0.rc1 lib/netzke/core/endpoint_response.rb
netzke-core-0.12.0.beta lib/netzke/core/endpoint_response.rb
netzke-core-0.11.0 lib/netzke/core/endpoint_response.rb
netzke-core-0.10.1 lib/netzke/core/endpoint_response.rb
netzke-core-0.10.0 lib/netzke/core/endpoint_response.rb
netzke-core-0.9.0 lib/netzke/core/endpoint_response.rb
netzke-core-0.10.0.rc2 lib/netzke/core/endpoint_response.rb
netzke-core-0.10.0.rc1 lib/netzke/core/endpoint_response.rb
netzke-core-0.9.0.rc1 lib/netzke/core/endpoint_response.rb
netzke-core-0.8.4 lib/netzke/core/endpoint_response.rb
netzke-core-0.8.3 lib/netzke/core/endpoint_response.rb
netzke-core-0.8.2 lib/netzke/core/endpoint_response.rb
netzke-core-0.8.1 lib/netzke/core/endpoint_response.rb
netzke-core-0.8.0 lib/netzke/core/endpoint_response.rb