Class: Counter::Cache::Counters::BufferCounter::Enqueuer

Inherits:
Struct
  • Object
show all
Defined in:
lib/counter/cache/counters/buffer_counter/enqueuer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#counter_class_nameObject

Returns the value of attribute counter_class_name

Returns:

  • (Object)

    the current value of counter_class_name



5
6
7
# File 'lib/counter/cache/counters/buffer_counter/enqueuer.rb', line 5

def counter_class_name
  @counter_class_name
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



5
6
7
# File 'lib/counter/cache/counters/buffer_counter/enqueuer.rb', line 5

def options
  @options
end

#relation_classObject

Returns the value of attribute relation_class

Returns:

  • (Object)

    the current value of relation_class



5
6
7
# File 'lib/counter/cache/counters/buffer_counter/enqueuer.rb', line 5

def relation_class
  @relation_class
end

#relation_idObject

Returns the value of attribute relation_id

Returns:

  • (Object)

    the current value of relation_id



5
6
7
# File 'lib/counter/cache/counters/buffer_counter/enqueuer.rb', line 5

def relation_id
  @relation_id
end

#source_object_class_nameObject

Returns the value of attribute source_object_class_name

Returns:

  • (Object)

    the current value of source_object_class_name



5
6
7
# File 'lib/counter/cache/counters/buffer_counter/enqueuer.rb', line 5

def source_object_class_name
  @source_object_class_name
end

Instance Method Details

#enqueue!(source_object) ⇒ Object



6
7
8
9
# File 'lib/counter/cache/counters/buffer_counter/enqueuer.rb', line 6

def enqueue!(source_object)
  create_and_enqueue(options.wait(source_object), options.cached?)
  create_and_enqueue(options.recalculation_delay, false) if options.recalculation?
end