Class: FrOData::NavigationProperty::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/frodata/navigation_property/proxy.rb

Instance Method Summary collapse

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

#valueObject



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