Class: Pling::DelayedInitializer

Inherits:
Array
  • Object
show all
Defined in:
lib/pling/delayed_initializer.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) initialize!



7
8
9
10
11
12
13
# File 'lib/pling/delayed_initializer.rb', line 7

def initialize!
  map! do |item|
    item = item.kind_of?(Array) ? item.shift.new(*item) : item
    item.setup! if item.respond_to?(:setup!)
    item
  end
end

- (Object) use(*args)



3
4
5
# File 'lib/pling/delayed_initializer.rb', line 3

def use(*args)
  self << args
end