Class: ActiveRecord::Turntable::Mixer::Fader

Inherits:
Object
  • Object
show all
Extended by:
ActiveSupport::Autoload
Defined in:
lib/active_record/turntable/mixer/fader.rb,
lib/active_record/turntable/mixer/fader/specified_shard.rb,
lib/active_record/turntable/mixer/fader/insert_shards_merge_result.rb,
lib/active_record/turntable/mixer/fader/select_shards_merge_result.rb,
lib/active_record/turntable/mixer/fader/update_shards_merge_result.rb,
lib/active_record/turntable/mixer/fader/calculate_shards_sum_result.rb

Defined Under Namespace

Classes: CalculateShardsSumResult, InsertShardsMergeResult, SelectShardsMergeResult, SpecifiedShard, UpdateShardsMergeResult

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(proxy, shards_query_hash, called_method, query, *args, &block) ⇒ Fader

Returns a new instance of Fader.



22
23
24
25
26
27
28
29
# File 'lib/active_record/turntable/mixer/fader.rb', line 22

def initialize(proxy, shards_query_hash, called_method, query, *args, &block)
  @proxy = proxy
  @shards_query_hash = shards_query_hash
  @called_method = called_method
  @query = query
  @args = args
  @block = block
end

Instance Attribute Details

#called_methodObject (readonly)

Returns the value of attribute called_method.



19
20
21
# File 'lib/active_record/turntable/mixer/fader.rb', line 19

def called_method
  @called_method
end

#queryObject (readonly)

Returns the value of attribute query.



20
21
22
# File 'lib/active_record/turntable/mixer/fader.rb', line 20

def query
  @query
end

#shards_query_hashObject (readonly)

Returns the value of attribute shards_query_hash.



18
19
20
# File 'lib/active_record/turntable/mixer/fader.rb', line 18

def shards_query_hash
  @shards_query_hash
end

Instance Method Details

#executeObject

Raises:

  • (NotImplementedError)


31
32
33
# File 'lib/active_record/turntable/mixer/fader.rb', line 31

def execute
  raise NotImplementedError, "Called abstract method"
end