Class: JetSet::Collection

Inherits:
Object
  • Object
show all
Defined in:
lib/jet_set/collection.rb

Overview

Collection represents a collection attribute mapping. Should be instantiated by method collection of JetSet::EntityMapping instance.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, type, using = nil) ⇒ Collection

Parameters:

+name+:: name of the attribute
+type+:: class of an entity
+using+:: (optional) name of many-to-many association table if needed.


11
12
13
14
15
# File 'lib/jet_set/collection.rb', line 11

def initialize(name, type, using = nil)
  @name = name
  @type = type
  @using = using
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/jet_set/collection.rb', line 5

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/jet_set/collection.rb', line 5

def type
  @type
end

#usingObject (readonly)

Returns the value of attribute using.



5
6
7
# File 'lib/jet_set/collection.rb', line 5

def using
  @using
end