Method: Flex::Result#initialize
- Defined in:
- lib/flex/result.rb
#initialize(template, variables, response, result = nil) ⇒ Result
Returns a new instance of Result.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/flex/result.rb', line 7 def initialize(template, variables, response, result=nil) @template = template @variables = variables @response = response replace result || !response.body.empty? && MultiJson.decode(response.body) || return Conf.result_extenders.each do |ext| next if ext.respond_to?(:should_extend?) && !ext.should_extend?(self) extend ext end end |