class SymbolComponent
Public Class Methods
new(parent, symbol, color=:white)
click to toggle source
# File lib/delve/component/symbol.rb, line 2 def initialize(parent, symbol, color=:white) raise 'Cannot create symbol component when parent is nil' unless parent raise 'Cannot create symbol component when symbol is nil' unless symbol @parent = parent @symbol = symbol @color = color end
Public Instance Methods
id()
click to toggle source
# File lib/delve/component/symbol.rb, line 11 def id :symbol end
symbol()
click to toggle source
# File lib/delve/component/symbol.rb, line 20 def symbol { :char => @symbol, :color => @color } end
update(symbol, color=:white)
click to toggle source
# File lib/delve/component/symbol.rb, line 15 def update(symbol, color=:white) @symbol = symbol @color = color end