Class: Themify::Template
- Inherits:
-
Object
- Object
- Themify::Template
- Defined in:
- lib/themify/template.rb
Instance Attribute Summary collapse
-
#colors ⇒ Object
readonly
Returns the value of attribute colors.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, colors) ⇒ Template
constructor
Creates a new template Takes an hash as argument { ‘primary’: ‘#ccffee’ }.
Constructor Details
#initialize(name, colors) ⇒ Template
Creates a new template Takes an hash as argument { ‘primary’: ‘#ccffee’ }
12 13 14 15 16 |
# File 'lib/themify/template.rb', line 12 def initialize(name, colors) raise 'You should pass an hash of key values for colors and a string as name' unless colors.instance_of?(Hash) && name.instance_of?(String) @name = name @colors = colors end |
Instance Attribute Details
#colors ⇒ Object (readonly)
Returns the value of attribute colors.
3 4 5 |
# File 'lib/themify/template.rb', line 3 def colors @colors end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/themify/template.rb', line 4 def name @name end |