Class: Object

Inherits:
BasicObject
Defined in:
lib/abstractivator/proc_ext.rb,
lib/abstractivator/value_map.rb

Instance Method Summary collapse

Instance Method Details

#callable?Boolean

Returns:

  • (Boolean)


173
174
175
# File 'lib/abstractivator/proc_ext.rb', line 173

def callable?
  respond_to?(:call)
end

#proxy_send(method_name, *args, **kws, &block) ⇒ Object



177
178
179
180
181
182
183
184
185
# File 'lib/abstractivator/proc_ext.rb', line 177

def proxy_send(method_name, *args, **kws, &block)
  if method(method_name).accepts_keywords
    send(method_name, *args, **kws, &block)
  elsif kws.any?
    send(method_name, *(args + [kws]), &block)
  else
    send(method_name, *args, &block)
  end
end

#value_map {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Object)

    the object that the method was called on



12
13
14
# File 'lib/abstractivator/value_map.rb', line 12

def value_map
  yield self
end