Sha256: 584fac948df750f26dda69cd5c668ccc2e29d62cd278a8948d4a1a1189d47e24

Contents?: true

Size: 482 Bytes

Versions: 28

Compression:

Stored size: 482 Bytes

Contents

module ActiveFulfillment
  class Response
    attr_reader :params
    attr_reader :message
    attr_reader :test

    def success?
      @success
    end

    def test?
      @test
    end

    def initialize(success, message, params = {}, options = {})
      @success, @message, @params = success, message, params.stringify_keys
      @test = options[:test] || false
    end

    private
    def method_missing(method, *args)
      @params[method.to_s] || super
    end
  end

end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
active_fulfillment-3.2.11 lib/active_fulfillment/response.rb
active_fulfillment-3.2.10 lib/active_fulfillment/response.rb
active_fulfillment-3.2.8 lib/active_fulfillment/response.rb
active_fulfillment-3.2.7 lib/active_fulfillment/response.rb
active_fulfillment-3.2.6 lib/active_fulfillment/response.rb
active_fulfillment-3.2.5 lib/active_fulfillment/response.rb
active_fulfillment-3.2.4 lib/active_fulfillment/response.rb
active_fulfillment-3.2.3 lib/active_fulfillment/response.rb
active_fulfillment-3.2.2 lib/active_fulfillment/response.rb
active_fulfillment-3.2.1 lib/active_fulfillment/response.rb
active_fulfillment-3.2.0 lib/active_fulfillment/response.rb
active_fulfillment-3.1.1 lib/active_fulfillment/response.rb
active_fulfillment-3.1.0 lib/active_fulfillment/response.rb
active_fulfillment-3.0.8 lib/active_fulfillment/response.rb
active_fulfillment-3.0.7 lib/active_fulfillment/response.rb
active_fulfillment-3.0.6 lib/active_fulfillment/response.rb
active_fulfillment-3.0.5 lib/active_fulfillment/response.rb
active_fulfillment-3.0.4 lib/active_fulfillment/response.rb
active_fulfillment-3.0.3 lib/active_fulfillment/response.rb
active_fulfillment-3.0.2 lib/active_fulfillment/response.rb