Class: Cupid::Response::Format
- Inherits:
-
Object
- Object
- Cupid::Response::Format
- Defined in:
- lib/cupid/response/format.rb
Constant Summary collapse
- IGNORE =
[:partner_key, :object_id]
- RENAME =
{ :new_id => :id, :'@xsi:type' => :type, :parent_folder => :parent_data }
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ Format
constructor
A new instance of Format.
Constructor Details
#initialize(data) ⇒ Format
Returns a new instance of Format.
18 19 20 21 22 23 24 |
# File 'lib/cupid/response/format.rb', line 18 def initialize(data) @data = data extract_nested_data rename_fields delete_ignored_fields delete_empty_parents end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
16 17 18 |
# File 'lib/cupid/response/format.rb', line 16 def data @data end |
Class Method Details
.apply(data) ⇒ Object
11 12 13 14 |
# File 'lib/cupid/response/format.rb', line 11 def self.apply(data) formatted = new data formatted.data end |