Class: Hashie::IUTrash

Inherits:
IUDash
  • Object
show all
Includes:
Extensions::Dash::PropertyTranslation
Defined in:
lib/braspag-rest/hashie/iutrash.rb

Instance Method Summary collapse

Instance Method Details

#inverse_attributesObject



7
8
9
10
11
12
13
14
15
# File 'lib/braspag-rest/hashie/iutrash.rb', line 7

def inverse_attributes
  self.class.translations.each_with_object({}) do |(from, property), attributes|
    value = nested_inverse(self.send(property))

    unless value.nil?
      attributes[from] = value
    end
  end
end