Class: JetSet::Reference
- Inherits:
-
Object
- Object
- JetSet::Reference
- Defined in:
- lib/jet_set/reference.rb
Overview
Reference represents a mapping of complex type attribute (another entity). Should be instantiated by method reference
of JetSet::EntityMapping
instance.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type, weak) ⇒ Reference
constructor
- Parameters:
name
- name of the attribute
type
- class of an entity
weak
-
is it weak reference?.
- class of an entity
- name of the attribute
- Parameters:
- #weak? ⇒ Boolean
Constructor Details
#initialize(name, type, weak) ⇒ Reference
Parameters:
+name+:: name of the attribute
+type+:: class of an entity
+weak+:: is it weak reference?
11 12 13 14 15 |
# File 'lib/jet_set/reference.rb', line 11 def initialize(name, type, weak) @name = name @type = type @weak = weak end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/jet_set/reference.rb', line 5 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/jet_set/reference.rb', line 5 def type @type end |
Instance Method Details
#weak? ⇒ Boolean
17 18 19 |
# File 'lib/jet_set/reference.rb', line 17 def weak? @weak end |