class StatusEnumerator

Public Class Methods

new(target) click to toggle source
# File lib/status_enumerator.rb, line 2
def initialize(target)
  raise ArgumentError, '%s is not redpond to #each' % target.class.name if target.nil? or !target.respond_to?(:each)
  @target = target
end

Public Instance Methods

each(&block) click to toggle source
# File lib/status_enumerator.rb, line 7
def each(&block)
  status_class.send(:new, nil, &block).send(:each_status, @target)
end
status_class() click to toggle source
# File lib/status_enumerator.rb, line 11
def status_class; Status end