Sha256: 8855509f34a3ee706dc20e3ec4192080572df2e11ceac8b7db685817240ba710

Contents?: true

Size: 276 Bytes

Versions: 6

Compression:

Stored size: 276 Bytes

Contents

require 'rules/parameters/parameter'

module Rules::Parameters
  class Constant < Parameter
    attr_accessor :evaluation_method

    def evaluate(attributes = {})
      raise 'Unknown evaluation method' unless evaluation_method
      evaluation_method.call
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rules-1.1.1 lib/rules/parameters/constant.rb
rules-1.1.0 lib/rules/parameters/constant.rb
rules-1.0.0 lib/rules/parameters/constant.rb
rules-0.1.2 lib/rules/parameters/constant.rb
rules-0.1.1 lib/rules/parameters/constant.rb
rules-0.1.0 lib/rules/parameters/constant.rb