Sha256: c13daf5f5dbc5aa9c16f1f247805c48c3613a5b8cf502624e3465e01a1a2eab1

Contents?: true

Size: 360 Bytes

Versions: 11

Compression:

Stored size: 360 Bytes

Contents

# frozen_string_literal: true

module Realize
  class Value
    # Transformer that always returns a static value
    class Static
      acts_as_hashable

      attr_reader :value

      def initialize(value: nil)
        @value = value

        freeze
      end

      def transform(_resolver, _value, _time, _record)
        value
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
realize-1.3.0 lib/realize/value/static.rb
realize-1.2.0 lib/realize/value/static.rb
realize-1.2.0.pre.alpha lib/realize/value/static.rb
realize-1.1.1 lib/realize/value/static.rb
realize-1.1.1.pre.alpha lib/realize/value/static.rb
realize-1.1.0 lib/realize/value/static.rb
realize-1.0.0 lib/realize/value/static.rb
realize-1.0.0.pre.alpha.3 lib/realize/value/static.rb
realize-1.0.0.pre.alpha.2 lib/realize/value/static.rb
realize-1.0.0.pre.alpha.1 lib/realize/value/static.rb
realize-1.0.0.pre.alpha lib/realize/value/static.rb