Method: Icodi#initialize
- Defined in:
- lib/icodi.rb
#initialize(text = nil, opts = {}) ⇒ Icodi
Returns a new instance of Icodi.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/icodi.rb', line 12 def initialize(text = nil, opts = {}) text, opts = nil, text if text.is_a? Hash @text = text = .merge opts super template: template, viewBox: "0 0 #{size} #{size}", id: id generate end |