Sha256: d4dae2a609abc6ee679344fcec3653c7fb99175a0d579066e3ce2ccc8ae1cab4

Contents?: true

Size: 280 Bytes

Versions: 3

Compression:

Stored size: 280 Bytes

Contents

module Activerecord
  module Transactionable
    class Result
      attr_reader :value
      def initialize(value)
        @value = value
      end
      
      def fail?
        value == false
      end
      
      def success?
        value == true
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
activerecord-transactionable-2.0.2 lib/activerecord/transactionable/result.rb
activerecord-transactionable-2.0.1 lib/activerecord/transactionable/result.rb
activerecord-transactionable-2.0.0 lib/activerecord/transactionable/result.rb