Class: Stylegen::BaseElevatedColor

Inherits:
Object
  • Object
show all
Defined in:
lib/stylegen/colors/base_elevated_color.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#descriptionObject (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