Class: Viiite::Unit::Enum

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/viiite/unit.rb

Instance Method Summary collapse

Constructor Details

#initialize(unit, extra) ⇒ Enum



21
22
23
24
# File 'lib/viiite/unit.rb', line 21

def initialize(unit, extra)
  @unit  = unit
  @extra = extra
end

Instance Method Details

#each(&proc) ⇒ Object



26
27
28
29
# File 'lib/viiite/unit.rb', line 26

def each(&proc)
  return self unless proc
  @unit.run(@extra, proc)
end