Module: Graphiti::Links::Overrides

Defined in:
lib/graphiti/resource/links.rb

Instance Method Summary collapse

Instance Method Details

#endpointObject



8
9
10
11
12
13
14
# File 'lib/graphiti/resource/links.rb', line 8

def endpoint
  if (endpoint = super)
    endpoint
  elsif !@__skip_inference
    self.endpoint = infer_endpoint
  end
end

#endpoint=(value) ⇒ Object



16
17
18
19
20
21
# File 'lib/graphiti/resource/links.rb', line 16

def endpoint=(value)
  # changes introduced in Ruby 3.2 and above require some extra hoops
  # to allow .endpoint = nil to work properly
  @__skip_inference = value.blank?
  super
end