Class: AngularSprinkles::Constructor

Inherits:
Object
  • Object
show all
Defined in:
lib/angular_sprinkles/constructor.rb

Instance Method Summary collapse

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_jsonObject



8
9
10
# File 'lib/angular_sprinkles/constructor.rb', line 8

def to_json
  @json_wrapper.call(@collection)
end