Class: FlameChannelParser::Inspector::OH
- Inherits:
-
Hash
- Object
- Hash
- FlameChannelParser::Inspector::OH
- Defined in:
- lib/inspector.rb
Overview
It sucks to be Ruby 1.8-compatible sometimes.
Instance Method Summary collapse
- #[]=(k, v) ⇒ Object
- #each_pair ⇒ Object
-
#initialize ⇒ OH
constructor
A new instance of OH.
Constructor Details
#initialize ⇒ OH
Returns a new instance of OH.
18 19 20 21 |
# File 'lib/inspector.rb', line 18 def initialize super @keys_in_order = [] end |
Instance Method Details
#[]=(k, v) ⇒ Object
23 24 25 26 27 |
# File 'lib/inspector.rb', line 23 def []=(k, v) @keys_in_order.delete(k) @keys_in_order << k super(k, v) end |
#each_pair ⇒ Object
29 30 31 |
# File 'lib/inspector.rb', line 29 def each_pair @keys_in_order.each {|k| yield(k, self[k]) } end |