Sha256: f201e1d575423ac3ca551c2dd4575fa9d751f10fec47eb7a2dcbb80323ef16e8

Contents?: true

Size: 433 Bytes

Versions: 16

Compression:

Stored size: 433 Bytes

Contents

module EndState
  class Guard
    include Messages
    attr_reader :object, :state, :params

    def initialize(object, state, params)
      @object = object
      @state = state
      @params = params
    end

    def allowed?
      will_allow?.tap do |result|
        failed unless result
        passed if result
      end
    end

    def will_allow?
      false
    end

    def passed
    end

    def failed
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
end_state-1.1.2 lib/end_state/guard.rb
end_state-1.1.1 lib/end_state/guard.rb
end_state-1.1.0 lib/end_state/guard.rb
end_state-1.0.2 lib/end_state/guard.rb
end_state-1.0.1 lib/end_state/guard.rb
end_state-1.0.0 lib/end_state/guard.rb
end_state-0.12.0 lib/end_state/guard.rb
end_state-0.11.0 lib/end_state/guard.rb
end_state-0.10.1 lib/end_state/guard.rb
end_state-0.10.0 lib/end_state/guard.rb
end_state-0.9.0 lib/end_state/guard.rb
end_state-0.4.0 lib/end_state/guard.rb
end_state-0.3.2 lib/end_state/guard.rb
end_state-0.3.1 lib/end_state/guard.rb
end_state-0.3.0 lib/end_state/guard.rb
end_state-0.2.0 lib/end_state/guard.rb