Sha256: 4b88168f0605b023d9014c01cde2d07551479524dacc1f2f4639f63860e8a1e5

Contents?: true

Size: 569 Bytes

Versions: 5

Compression:

Stored size: 569 Bytes

Contents

class RestModel
  class Property < Key
    autoload :Sender,    "rest_model/key/property/sender"
    autoload :Retriever, "rest_model/key/property/retriever"
    autoload :Response,  "rest_model/key/property/response"
    include   Sender
    include   Retriever
    include   Response

    attr_accessor :serializer, :translations

    def initialize(name, options = {})
      super
      @serializer   = options.fetch(:type, Serialization::String)
      @translations = options[:values]
    end

    def from_hash(value, resource = nil)
      value
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rest_model-0.1.4 lib/rest_model/key/property.rb
rest_model-0.1.3 lib/rest_model/key/property.rb
rest_model-0.1.2 lib/rest_model/key/property.rb
rest_model-0.1.1 lib/rest_model/key/property.rb
rest_model-0.1.0 lib/rest_model/key/property.rb