Class: Transcriber::Resource::Property

Inherits:
Key
  • Object
show all
Includes:
Parser, Response
Defined in:
lib/transcriber/resource/key/property.rb,
lib/transcriber/resource/key/property/parser.rb,
lib/transcriber/resource/key/property/builder.rb,
lib/transcriber/resource/key/property/response.rb

Defined Under Namespace

Modules: Builder, Parser, Response

Instance Attribute Summary collapse

Attributes inherited from Key

#model, #name, #options, #summarize

Instance Method Summary collapse

Methods included from Response

#link, #resource, #resource_keys, #summarize?

Methods included from Parser

#parse, #parse!

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.



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

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.



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

def serializer
  @serializer
end

#translationsObject

Returns the value of attribute translations.



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

def translations
  @translations
end