Class: Nokogiri::XML::Node

Inherits:
Object show all
Defined in:
lib/rubyvis/scene/svg_scene.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#_sceneObject

Returns the value of attribute _scene.



30
31
32
# File 'lib/rubyvis/scene/svg_scene.rb', line 30

def _scene
  @_scene
end

Instance Method Details

#add_element(c) ⇒ Object



31
32
33
# File 'lib/rubyvis/scene/svg_scene.rb', line 31

def add_element(c)
  add_child(c)
end

#delete_attribute(name) ⇒ Object



48
49
50
# File 'lib/rubyvis/scene/svg_scene.rb', line 48

def delete_attribute(name)
  remove_attribute(name)
end

#get_element(i) ⇒ Object



40
41
42
# File 'lib/rubyvis/scene/svg_scene.rb', line 40

def get_element(i)
  elements.empty? ? nil : elements[i-1]
end

#next_sibling_nodeObject

private :elements private :attributes



45
46
47
# File 'lib/rubyvis/scene/svg_scene.rb', line 45

def next_sibling_node
  next_sibling
end

#set_attributes(h) ⇒ Object



35
36
37
38
39
# File 'lib/rubyvis/scene/svg_scene.rb', line 35

def set_attributes(h)
  h.each do |k,v|
    set_attribute(k,v.to_s)
  end
end

#textObject



51
52
53
# File 'lib/rubyvis/scene/svg_scene.rb', line 51

def text
  content
end

#text=(v) ⇒ Object



54
55
56
# File 'lib/rubyvis/scene/svg_scene.rb', line 54

def text=(v)
  self.content=v
end