Module: Ardb::RecordSpy::InstanceMethods
- Defined in:
- lib/ardb/record_spy.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
- #manually_run_callbacks ⇒ Object
- #run_callbacks(name, &block) ⇒ Object
- #update_column(col, value) ⇒ Object
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
184 185 186 |
# File 'lib/ardb/record_spy.rb', line 184 def id @id end |
Instance Method Details
#manually_run_callbacks ⇒ Object
190 191 192 |
# File 'lib/ardb/record_spy.rb', line 190 def manually_run_callbacks @manually_run_callbacks ||= [] end |
#run_callbacks(name, &block) ⇒ Object
194 195 196 197 |
# File 'lib/ardb/record_spy.rb', line 194 def run_callbacks(name, &block) self.manually_run_callbacks << name block.call if block end |
#update_column(col, value) ⇒ Object
186 187 188 |
# File 'lib/ardb/record_spy.rb', line 186 def update_column(col, value) self.send("#{col}=", value) end |