Advertisement
Guest User

Untitled

a guest
Mar 26th, 2012
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.30 KB | None | 0 0
  1. class XMLBase
  2.   def initialize(element=nil)
  3.     @properties = Hash.new
  4.     @properties["hi"] = "test"
  5.  
  6.     if (element)
  7.       element.each { |child|
  8.         @properties[child.attributes["name"]] = child.text
  9.         puts child.text
  10.       }
  11.     end
  12.   end
  13.  
  14. protected
  15.   #attr_accessor :properties
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement