Class: Jsonoid::Document::Scope
- Inherits:
-
Object
- Object
- Jsonoid::Document::Scope
- Defined in:
- lib/jsonoid/document.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(type, collection) ⇒ Scope
constructor
A new instance of Scope.
Constructor Details
#initialize(type, collection) ⇒ Scope
Returns a new instance of Scope.
102 103 104 105 |
# File 'lib/jsonoid/document.rb', line 102 def initialize(type, collection) @type = type @collection = collection end |
Instance Method Details
#each ⇒ Object
107 108 109 110 111 |
# File 'lib/jsonoid/document.rb', line 107 def each @collection.each do |data| yield @type.parse(data) end end |