Class: RGL::DOT::Element
- Inherits:
-
Object
- Object
- RGL::DOT::Element
- Defined in:
- lib/rgl/rdot.rb
Overview
Ancestor of Edge, Node, and Graph.
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(params = {}, option_list = []) ⇒ Element
constructor
A new instance of Element.
Constructor Details
#initialize(params = {}, option_list = []) ⇒ Element
Returns a new instance of Element.
196 197 198 199 200 201 202 203 |
# File 'lib/rgl/rdot.rb', line 196 def initialize(params = {}, option_list = []) @name = params['name'] ? params['name'] : nil @options = {} option_list.each do |i| @options[i] = params[i] if params[i] end end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
194 195 196 |
# File 'lib/rgl/rdot.rb', line 194 def name @name end |
#options ⇒ Object
Returns the value of attribute options.
194 195 196 |
# File 'lib/rgl/rdot.rb', line 194 def @options end |