Class: Object

Inherits:
BasicObject
Defined in:
lib/active_component/core_extensions.rb

Instance Method Summary collapse

Instance Method Details

#transmogrify(*ignored_args) {|_self| ... } ⇒ Object

Transmogrify yields self to the given block by default

Yields:

  • (_self)

Yield Parameters:

  • _self (Object)

    the object that the method was called on



6
7
8
# File 'lib/active_component/core_extensions.rb', line 6

def transmogrify(*ignored_args)
  yield self
end

#transmogrify_with_index(&block) ⇒ Object

Wrapper for enumerable transmogrify



11
12
13
# File 'lib/active_component/core_extensions.rb', line 11

def transmogrify_with_index(&block)
  transmogrify(:yield_index, &block)
end