Class: AngularSprinkles::Constructor
- Inherits:
-
Object
- Object
- AngularSprinkles::Constructor
- Defined in:
- lib/angular_sprinkles/constructor.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Constructor
constructor
A new instance of Constructor.
- #to_json ⇒ Object
Constructor Details
#initialize(args) ⇒ Constructor
Returns a new instance of Constructor.
3 4 5 6 |
# File 'lib/angular_sprinkles/constructor.rb', line 3 def initialize(args) @json_wrapper = args.fetch(:json_wrapper) @collection = args.fetch(:collection) end |
Instance Method Details
#to_json ⇒ Object
8 9 10 |
# File 'lib/angular_sprinkles/constructor.rb', line 8 def to_json @json_wrapper.call(@collection) end |