Sha256: bcb50a7e8c49d0612c86a233c64ab37987832d05d5159efbe0d99ac1a2de0f2a

Contents?: true

Size: 502 Bytes

Versions: 9

Compression:

Stored size: 502 Bytes

Contents

module Affirm
  class SuccessResult
    attr_reader :object
    private :object

    def initialize(object)
      @object = object
    end

    def success?
      true
    end

    def method_missing(method_name, *arguments, &block)
      if object.respond_to?(method_name)
        object.send(method_name, *arguments, &block)
      else
        super
      end
    end

    def respond_to_missing?(method_name, include_private = false)
      object.respond_to?(method_name) || super
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
affirm-ruby-1.2.0 lib/affirm/success_result.rb
affirm-ruby-1.1.3 lib/affirm/success_result.rb
affirm-ruby-1.1.2 lib/affirm/success_result.rb
affirm-ruby-1.1.1 lib/affirm/success_result.rb
affirm-ruby-1.1.0 lib/affirm/success_result.rb
affirm-ruby-1.0.2 lib/affirm/success_result.rb
affirm-ruby-1.0.1 lib/affirm/success_result.rb
affirm-ruby-1.0.0 lib/affirm/success_result.rb
affirm-ruby-0.0.1 lib/affirm/success_result.rb