Class: Andromeda::Atom::FillOnce

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

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 Method Details

#empty!Object



84
# File 'lib/andromeda/atom.rb', line 84

def empty! ; super.update nil end

#update(v) ⇒ Object



86
87
88
89
90
91
# File 'lib/andromeda/atom.rb', line 86

def update(v)
  super.update do |o|
    raise ArgumentError, 'Attempt to refill FillOnce' if o
    v
  end
end