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
:nodoc:.
Constructor Details
#initialize(params = {}, option_list = []) ⇒ Element
:nodoc:
138 139 140 141 142 143 144 |
# File 'lib/rgl/rdot.rb', line 138 def initialize (params = {}, option_list = []) # :nodoc: @name = params['name'] ? params['name'] : nil @options = {} option_list.each{ |i| @options[i] = params[i] if params[i] } end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
136 137 138 |
# File 'lib/rgl/rdot.rb', line 136 def name @name end |
#options ⇒ Object
Returns the value of attribute options.
136 137 138 |
# File 'lib/rgl/rdot.rb', line 136 def @options end |