Class: Attributes
- Inherits:
-
Hash
- Object
- Hash
- Attributes
- Defined in:
- lib/rexleparser.rb
Defined Under Namespace
Classes: Value
Instance Method Summary collapse
- #[]=(k, v) ⇒ Object
- #delete(key = nil) ⇒ Object
-
#initialize(h = {}) ⇒ Attributes
constructor
A new instance of Attributes.
- #merge(h) ⇒ Object
Constructor Details
#initialize(h = {}) ⇒ Attributes
Returns a new instance of Attributes.
34 35 36 |
# File 'lib/rexleparser.rb', line 34 def initialize(h={}) super().merge! h end |
Instance Method Details
#[]=(k, v) ⇒ Object
38 39 40 |
# File 'lib/rexleparser.rb', line 38 def []=(k,v) super(k, k != :class ? Value.new(v) : v) end |
#delete(key = nil) ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'lib/rexleparser.rb', line 42 def delete(key=nil) if key then super(key) else keys.each {|key| super(key)} end end |