Class: Iolite::Lazy

Inherits:
BasicObject
Includes:
Adaptor::Apply, Adaptor::Bind, Adaptor::Callable, Adaptor::MethodMissing, Adaptor::Operators, Adaptor::Send, Adaptor::ToLazy, Adaptor::ToProc
Defined in:
lib/iolite/lazy.rb,
lib/iolite/adaptored/iolite_lazy_with_hash.rb

Instance Method Summary collapse

Methods included from Adaptor::ToLazy

#to_lazy

Methods included from Adaptor::Operators

#disjunction, #product

Methods included from Adaptor::Apply

#apply

Methods included from Adaptor::ToProc

#to_proc

Methods included from Adaptor::MethodMissing

method_missing

Methods included from Adaptor::Send

#send

Methods included from Adaptor::Bind

#bind

Methods included from Adaptor::Callable

#iolite_functinal_invoke_call

Constructor Details

#initialize(&block) ⇒ Lazy



15
16
17
# File 'lib/iolite/lazy.rb', line 15

def initialize &block
  @block = block
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Iolite::Adaptor::MethodMissing

Instance Method Details

#call(*args) ⇒ Object



19
20
21
# File 'lib/iolite/lazy.rb', line 19

def call *args
  @block.call(*args)
end

#hashObject



3
4
5
# File 'lib/iolite/adaptored/iolite_lazy_with_hash.rb', line 3

def hash
  __id__
end