Class: Jsonp::Utils::Wrapper
- Inherits:
-
Object
- Object
- Jsonp::Utils::Wrapper
- Defined in:
- lib/jsonp/utils/wrapper.rb
Overview
:nodoc:
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(prefix, body, suffix) ⇒ Wrapper
constructor
A new instance of Wrapper.
Constructor Details
#initialize(prefix, body, suffix) ⇒ Wrapper
Returns a new instance of Wrapper.
5 6 7 |
# File 'lib/jsonp/utils/wrapper.rb', line 5 def initialize(prefix, body, suffix) @prefix, @body, @suffix = prefix, body, suffix end |
Instance Method Details
#each(&block) ⇒ Object
9 10 11 12 13 |
# File 'lib/jsonp/utils/wrapper.rb', line 9 def each(&block) block.call(@prefix) @body.each(&block) block.call(@suffix) end |