class Grape::Entity::Delegator::Base

Attributes

object[R]

Public Class Methods

new(object) click to toggle source
# File lib/grape_entity/delegator/base.rb, line 9
def initialize(object)
  @object = object
end

Public Instance Methods

accepts_options?() click to toggle source
# File lib/grape_entity/delegator/base.rb, line 17
def accepts_options?
  # Why not `arity > 1`? It might be negative https://ruby-doc.org/core-2.6.6/Method.html#method-i-arity
  method(:delegate).arity != 1
end
delegatable?(_attribute) click to toggle source
# File lib/grape_entity/delegator/base.rb, line 13
def delegatable?(_attribute)
  true
end