module TheGrid::Builder::Base
Public Instance Methods
assemble(context, options)
click to toggle source
# File lib/the_grid/builder.rb, line 71 def assemble(context, options) options.assert_valid_keys(:on, :with) params = options[:with].merge context.params build(context, :for => options[:on], :with => params) rescue ArgumentError => error stringify :status => 'error', :message => error.message end
build()
click to toggle source
# File lib/the_grid/builder.rb, line 83 def build raise NotImplementedError end
compose(records, params)
click to toggle source
# File lib/the_grid/builder.rb, line 65 def compose(records, params) api = ::TheGrid::Api.new(records) api.compose!(params) api end
stringify(data)
click to toggle source
# File lib/the_grid/builder.rb, line 79 def stringify(data) data.inspect end