Class: Transcriber::Resource::Property

Inherits:
Key
  • Object
show all
Includes:
Transcriber::Resource::Parser::Property, Response::Property
Defined in:
lib/transcriber/resource/key/property.rb

Instance Attribute Summary collapse

Attributes inherited from Key

#model, #name, #options, #summarize

Instance Method Summary collapse

Methods included from Response::Property

#to_resource

Methods included from Transcriber::Resource::Parser::Property

#digg, #from_hash, #parse, #to_input, #translate_from_input, #translate_to_input

Methods inherited from Key

#convert_input_keys, #input_path, #present?, #root_path?, #visible?

Constructor Details

#initialize(name, options = {}) ⇒ Property

Returns a new instance of Property.



9
10
11
12
13
# File 'lib/transcriber/resource/key/property.rb', line 9

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

Instance Attribute Details

#serializerObject

Returns the value of attribute serializer.



7
8
9
# File 'lib/transcriber/resource/key/property.rb', line 7

def serializer
  @serializer
end

#translationsObject

Returns the value of attribute translations.



7
8
9
# File 'lib/transcriber/resource/key/property.rb', line 7

def translations
  @translations
end