Module: Is::Lazy

Defined in:
lib/is/lazy.rb

Defined Under Namespace

Classes: Value

Constant Summary collapse

VERSION =
'0.9.1'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.go(*args) {|*args| ... } ⇒ Value

Create thread calculated object.

Yields:

  • (*args)

    Calculation of value.

Returns:


158
159
160
# File 'lib/is/lazy.rb', line 158

def go *args, &block
  Value.new :thread, *args, &block
end

.lazy(*args) {|*args| ... } ⇒ Value

Create lazy calculated object.

Yields:

  • (*args)

    Calculation of value.

Returns:


151
152
153
# File 'lib/is/lazy.rb', line 151

def lazy *args, &block
  Value.new :lambda, *args, &block
end

Instance Method Details

#go(*args) {|*args| ... } ⇒ Value (private)

Create thread calculated object.

Yields:

  • (*args)

    Calculation of value.

Returns:


158
159
160
# File 'lib/is/lazy.rb', line 158

def go *args, &block
  Value.new :thread, *args, &block
end

#lazy(*args) {|*args| ... } ⇒ Value (private)

Create lazy calculated object.

Yields:

  • (*args)

    Calculation of value.

Returns:


151
152
153
# File 'lib/is/lazy.rb', line 151

def lazy *args, &block
  Value.new :lambda, *args, &block
end