Class: Stylegen::BaseElevatedColor
- Inherits:
-
Object
- Object
- Stylegen::BaseElevatedColor
- Defined in:
- lib/stylegen/colors/base_elevated_color.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
Instance Method Summary collapse
-
#initialize(base, elevated) ⇒ BaseElevatedColor
constructor
A new instance of BaseElevatedColor.
- #to_s(struct_name, indent = 0) ⇒ Object
Constructor Details
#initialize(base, elevated) ⇒ BaseElevatedColor
Returns a new instance of BaseElevatedColor.
7 8 9 10 |
# File 'lib/stylegen/colors/base_elevated_color.rb', line 7 def initialize(base, elevated) @base = base @elevated = elevated end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
5 6 7 |
# File 'lib/stylegen/colors/base_elevated_color.rb', line 5 def description @description end |
Instance Method Details
#to_s(struct_name, indent = 0) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/stylegen/colors/base_elevated_color.rb', line 12 def to_s(struct_name, indent = 0) indent_prefix = ' ' * indent result = [] result << "#{struct_name}(" result << "#{indent_prefix} base: #{@base.to_s(struct_name, indent + 4)}," result << "#{indent_prefix} elevated: #{@elevated.to_s(struct_name, indent + 4)}" result << "#{indent_prefix})" result.join("\n") end |