Class: Proc::Composition::Deferable

Inherits:
Object
  • Object
show all
Defined in:
lib/proc/composition/deferable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(proc) ⇒ Deferable

Returns a new instance of Deferable.



9
10
11
12
# File 'lib/proc/composition/deferable.rb', line 9

def initialize(proc)
  @proc = proc
  @arguments = {}
end

Instance Attribute Details

#arguments=(value) ⇒ Object (writeonly)

Sets the attribute arguments

Parameters:

  • value

    the value to set the attribute arguments to.



7
8
9
# File 'lib/proc/composition/deferable.rb', line 7

def arguments=(value)
  @arguments = value
end

#procObject (readonly)

Returns the value of attribute proc.



6
7
8
# File 'lib/proc/composition/deferable.rb', line 6

def proc
  @proc
end

Instance Method Details

#serializeObject



14
15
16
# File 'lib/proc/composition/deferable.rb', line 14

def serialize
  [@proc, @arguments]
end