Class: ActiverecordCallbackLens::Collector::CallbackDefinition

Inherits:
Data
  • Object
show all
Defined in:
lib/activerecord_callback_lens/collector/callback_definition.rb

Overview

Represents a single callback registered on an ActiveRecord model.

event + phase together reconstruct the full callback name (e.g. :before + :save => before_save). raw_conditions holds the unprocessed if/unless arrays from AR internals. condition_tree is nil until the Parser populates it (nil when no conditions).

Instance Attribute Summary collapse

Instance Attribute Details

#condition_treeObject (readonly)

Returns the value of attribute condition_tree

Returns:

  • (Object)

    the current value of condition_tree



11
12
13
# File 'lib/activerecord_callback_lens/collector/callback_definition.rb', line 11

def condition_tree
  @condition_tree
end

#eventObject (readonly)

Returns the value of attribute event

Returns:

  • (Object)

    the current value of event



11
12
13
# File 'lib/activerecord_callback_lens/collector/callback_definition.rb', line 11

def event
  @event
end

#filterObject (readonly)

Returns the value of attribute filter

Returns:

  • (Object)

    the current value of filter



11
12
13
# File 'lib/activerecord_callback_lens/collector/callback_definition.rb', line 11

def filter
  @filter
end

#modelObject (readonly)

Returns the value of attribute model

Returns:

  • (Object)

    the current value of model



11
12
13
# File 'lib/activerecord_callback_lens/collector/callback_definition.rb', line 11

def model
  @model
end

#phaseObject (readonly)

Returns the value of attribute phase

Returns:

  • (Object)

    the current value of phase



11
12
13
# File 'lib/activerecord_callback_lens/collector/callback_definition.rb', line 11

def phase
  @phase
end

#raw_conditionsObject (readonly)

Returns the value of attribute raw_conditions

Returns:

  • (Object)

    the current value of raw_conditions



11
12
13
# File 'lib/activerecord_callback_lens/collector/callback_definition.rb', line 11

def raw_conditions
  @raw_conditions
end

#source_locationObject (readonly)

Returns the value of attribute source_location

Returns:

  • (Object)

    the current value of source_location



11
12
13
# File 'lib/activerecord_callback_lens/collector/callback_definition.rb', line 11

def source_location
  @source_location
end