Class: RGL::DOT::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/rgl/rdot.rb

Overview

Ancestor of Edge, Node, and Graph.

Direct Known Subclasses

Edge, Graph, Node

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject

Returns the value of attribute name.



194
195
196
# File 'lib/rgl/rdot.rb', line 194

def name
  @name
end

#optionsObject

Returns the value of attribute options.



194
195
196
# File 'lib/rgl/rdot.rb', line 194

def options
  @options
end