Class: Andromeda::Atom::Combiner

Inherits:
Var show all
Defined in:
lib/andromeda/atom.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Impl::Atom

#empty?, #full?, #initialize, #to_short_s, #wait_until_empty?, #wait_until_eq, #wait_until_full?, #wait_until_ne, #wait_while, #with_value

Methods included from Impl::To_S

short_s, #to_s, #to_short_s

Constructor Details

This class inherits a constructor from Andromeda::Impl::Atom

Instance Attribute Details

#combinerObject (readonly)

Returns the value of attribute combiner.



95
96
97
# File 'lib/andromeda/atom.rb', line 95

def combiner
  @combiner
end

Instance Method Details

#update(v) ⇒ Object



97
98
99
100
101
# File 'lib/andromeda/atom.rb', line 97

def update(v)
  super.update do |o|
    if combiner then combiner.call o, v else v end
  end
end