Module: Wakizashi::Element::InstanceMethods
- Included in:
- GDataXMLElement
- Defined in:
- lib/wakizashi/xml_element.rb
Instance Method Summary collapse
Instance Method Details
#[](key) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/wakizashi/xml_element.rb', line 30 def [](key) attr = self.attributeForName(key) if attr attr.stringValue else nil end end |
#[]=(key, val) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/wakizashi/xml_element.rb', line 20 def []=(key, val) attr = self.attributeForName(key) if attr attr.stringValue = val else attr = self.addAttribute(GDataXMLNode.attributeWithName(key, stringValue:val)) end val end |