class SimpleJSONAPIClient::Relationships::Relationship

Attributes

url_opts[R]

Public Class Methods

new(model_class, url_opts = {}) click to toggle source
# File lib/simple_jsonapi_client/relationships/relationship.rb, line 4
def initialize(model_class, url_opts = {})
  @model_class = model_class
  @url_opts = url_opts
end

Public Instance Methods

call(*args) click to toggle source
# File lib/simple_jsonapi_client/relationships/relationship.rb, line 9
def call(*args)
  raise NotImplementedError
end

Private Instance Methods

model_class() click to toggle source
# File lib/simple_jsonapi_client/relationships/relationship.rb, line 16
def model_class
  @evaluated_model_class ||=
    case @model_class
    when String
      Kernel::const_get(@model_class)
    else
      @model_class
    end
end