Class: Stylegen::BaseElevatedColor
- Inherits:
-
Object
- Object
- Stylegen::BaseElevatedColor
- Defined in:
- lib/stylegen/colors/base_elevated_color.rb
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
5 6 7 |
# File 'lib/stylegen/colors/base_elevated_color.rb', line 5 def initialize(base, elevated) @base, @elevated = base, elevated end |
Instance Method Details
#to_s(struct_name, indent = 0) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/stylegen/colors/base_elevated_color.rb', line 9 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 |