Class: JetSet::Reference

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#typeObject (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

Returns:

  • (Boolean)


17
18
19
# File 'lib/jet_set/reference.rb', line 17

def weak?
  @weak
end