Class: FrOData::NavigationProperty::Proxy
- Inherits:
-
Object
- Object
- FrOData::NavigationProperty::Proxy
- Defined in:
- lib/frodata/navigation_property/proxy.rb
Instance Method Summary collapse
-
#initialize(entity, nav_name) ⇒ Proxy
constructor
A new instance of Proxy.
- #value ⇒ Object
- #value=(value) ⇒ Object
Constructor Details
#initialize(entity, nav_name) ⇒ Proxy
Returns a new instance of Proxy.
4 5 6 7 |
# File 'lib/frodata/navigation_property/proxy.rb', line 4 def initialize(entity, nav_name) @entity = entity @nav_name = nav_name end |
Instance Method Details
#value ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/frodata/navigation_property/proxy.rb', line 13 def value if link.nil? if nav_property.nav_type == :collection [] else nil end else @value ||= fetch_result end end |
#value=(value) ⇒ Object
9 10 11 |
# File 'lib/frodata/navigation_property/proxy.rb', line 9 def value=(value) @value = value end |