Class: Plistr::Dict
Instance Method Summary collapse
-
#initialize ⇒ Dict
constructor
A new instance of Dict.
- #parse ⇒ Object
- #push(value) ⇒ Object
Constructor Details
#initialize ⇒ Dict
Returns a new instance of Dict.
108 109 110 |
# File 'lib/plistr.rb', line 108 def initialize @hash = {} end |
Instance Method Details
#parse ⇒ Object
112 113 114 |
# File 'lib/plistr.rb', line 112 def parse @hash end |
#push(value) ⇒ Object
116 117 118 119 120 121 122 123 |
# File 'lib/plistr.rb', line 116 def push(value) if !@key @key = value.text else @hash[@key] = value.parse @key = nil end end |