Class: Icodi
- Inherits:
-
Victor::SVGBase
- Object
- Victor::SVGBase
- Icodi
- Defined in:
- lib/icodi.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text = nil, opts = {}) ⇒ Icodi
constructor
A new instance of Icodi.
Methods included from IcodiCore::Randomization
#random, #random_color, #random_sets, #seed
Methods included from IcodiCore::OptionHandling
#default_options, #method_missing, #mirror_both?, #mirror_x?, #mirror_y?, #respond_to?, #size, #style
Constructor Details
#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 @options = .merge opts super template: template, viewBox: "0 0 #{size} #{size}", id: id generate end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class IcodiCore::OptionHandling
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/icodi.rb', line 10 def @options end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
10 11 12 |
# File 'lib/icodi.rb', line 10 def text @text end |