Module: Fog::Attributes::InstanceMethods
- Defined in:
- lib/fog/openstack.rb
Instance Method Summary collapse
Instance Method Details
#all_associations ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/fog/openstack.rb', line 23 def all_associations self.class.associations.keys.reduce({}) do |hash, association| if masks[association].nil? Fog::Logger.deprecation("Please define #{association} using the Fog DSL") hash[association] = associations[association] || send(association) else hash[masks[association]] = associations[association] || send(association) end hash end end |
#all_attributes ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/fog/openstack.rb', line 10 def all_attributes self.class.attributes.reduce({}) do |hash, attribute| if masks[attribute].nil? Fog::Logger.deprecation("Please define #{attribute} using the Fog DSL") hash[attribute] = send(attribute) else hash[masks[attribute]] = send(attribute) end hash end end |