Class: Ridgepole::MigrationExt::TimeRecorder
- Inherits:
-
Object
- Object
- Ridgepole::MigrationExt::TimeRecorder
- Defined in:
- lib/ridgepole/migration_ext.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #add_key(key) ⇒ Object
- #add_value(value) ⇒ Object
-
#initialize ⇒ TimeRecorder
constructor
A new instance of TimeRecorder.
Constructor Details
#initialize ⇒ TimeRecorder
Returns a new instance of TimeRecorder.
46 47 48 |
# File 'lib/ridgepole/migration_ext.rb', line 46 def initialize @result = {} end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
44 45 46 |
# File 'lib/ridgepole/migration_ext.rb', line 44 def result @result end |
Instance Method Details
#add_key(key) ⇒ Object
50 51 52 |
# File 'lib/ridgepole/migration_ext.rb', line 50 def add_key(key) @key = key end |
#add_value(value) ⇒ Object
54 55 56 57 58 |
# File 'lib/ridgepole/migration_ext.rb', line 54 def add_value(value) @result[@key] = value if @key @key = nil end |