Sha256: ff8776be5a61abbda4d4496a89cfb4fb2612727457c6b930bbef21ef1b52d567

Contents?: true

Size: 550 Bytes

Versions: 1

Compression:

Stored size: 550 Bytes

Contents

# frozen_string_literal: true

require 'active_support/core_ext/module/delegation'

require_relative 'entry/keypath'
require_relative 'entry/value'

class ActiveSet
  class Instructions
    class Entry
      attr_reader :keypath

      delegate :attribute, :operator, :associations_array, :associations_hash, :value_for, :resource_for,
               to: :keypath

      def initialize(keypath, value)
        @keypath = KeyPath.new(keypath)
        @value = Value.new(value)
      end

      def value
        @value.raw
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activeset-0.3.1 lib/active_set/instructions/entry.rb