Class: EPIC::Collection::Recursive

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
src/epic_collection.rb

Instance Method Summary (collapse)

Constructor Details

- (Recursive) initialize(resource)

A new instance of Recursive



73
74
75
# File 'src/epic_collection.rb', line 73

def initialize resource
  @resource = resource
end

Instance Method Details

- (void) each(&block)



85
86
87
# File 'src/epic_collection.rb', line 85

def each &block
  @resource.each &block
end

- (void) each_pair



77
78
79
80
81
82
83
# File 'src/epic_collection.rb', line 77

def each_pair
  rf = Rackful::Request.current.resource_factory
  @resource.each do
    |path|
    yield path, rf[path]
  end
end