Class: Fog::Associations::OracleManyIdentities
- Inherits:
-
OracleDefault
- Object
- Default
- OracleDefault
- Fog::Associations::OracleManyIdentities
- Defined in:
- lib/fog/oracle/models/associations.rb
Instance Attribute Summary collapse
-
#all_name ⇒ Object
readonly
Returns the value of attribute all_name.
Instance Method Summary collapse
- #create_getter ⇒ Object
-
#initialize(model, name, collection_name, options) ⇒ OracleManyIdentities
constructor
A new instance of OracleManyIdentities.
Methods inherited from OracleDefault
Constructor Details
#initialize(model, name, collection_name, options) ⇒ OracleManyIdentities
Returns a new instance of OracleManyIdentities.
69 70 71 72 |
# File 'lib/fog/oracle/models/associations.rb', line 69 def initialize(model, name, collection_name, ) @all_name = [:all_name] super(model, name, collection_name, ) end |
Instance Attribute Details
#all_name ⇒ Object (readonly)
Returns the value of attribute all_name.
67 68 69 |
# File 'lib/fog/oracle/models/associations.rb', line 67 def all_name @all_name end |
Instance Method Details
#create_getter ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/fog/oracle/models/associations.rb', line 74 def create_getter super model.class_eval <<-EOS, __FILE__, __LINE__ def #{all_name} return [] if associations[:#{name}].nil? data = Array(associations[:#{name}]).map do |association| service.send(self.class.associations[:#{name}]).get(association) end #{association_class}.new(data) end EOS end |