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.
48 49 50 |
# File 'lib/ridgepole/migration_ext.rb', line 48 def initialize @result = {} end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
46 47 48 |
# File 'lib/ridgepole/migration_ext.rb', line 46 def result @result end |
Instance Method Details
#add_key(key) ⇒ Object
52 53 54 |
# File 'lib/ridgepole/migration_ext.rb', line 52 def add_key(key) @key = key end |
#add_value(value) ⇒ Object
56 57 58 59 60 |
# File 'lib/ridgepole/migration_ext.rb', line 56 def add_value(value) @result[@key] = value if @key @key = nil end |