Class: Viiite::Unit::Enum

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

Instance Method Summary (collapse)

Constructor Details

- (Enum) initialize(unit, extra)



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

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

Instance Method Details

- (Object) each(&proc)



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

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