Method: Wolfram::Pod#initialize
- Defined in:
- lib/wolfram/pod.rb
#initialize(xml, options = {}) ⇒ Pod
Returns a new instance of Pod.
14 15 16 17 18 19 20 21 |
# File 'lib/wolfram/pod.rb', line 14 def initialize(xml, = {}) @query = [:query] @xml = Nokogiri::XML(xml.to_s).search('pod').first @subpods = Subpod.collection(@xml.search('subpod'), ) @states = State.collection(@xml.search('states'), ) @xml or raise MissingNodeError, "<pod> node missing from xml: #{xml[0..20]}..." types.each {|type| extend type} end |