Class: Logsly::Colors
- Inherits:
-
Object
- Object
- Logsly::Colors
- Defined in:
- lib/logsly/colors.rb
Instance Attribute Summary collapse
-
#build ⇒ Object
readonly
Returns the value of attribute build.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, &build) ⇒ Colors
constructor
A new instance of Colors.
- #to_scheme(*args) ⇒ Object
Constructor Details
#initialize(name, &build) ⇒ Colors
Returns a new instance of Colors.
16 17 18 |
# File 'lib/logsly/colors.rb', line 16 def initialize(name, &build) @name, @build = name, build end |
Instance Attribute Details
#build ⇒ Object (readonly)
Returns the value of attribute build.
14 15 16 |
# File 'lib/logsly/colors.rb', line 14 def build @build end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
14 15 16 |
# File 'lib/logsly/colors.rb', line 14 def name @name end |
Instance Method Details
#to_scheme(*args) ⇒ Object
20 21 22 23 24 |
# File 'lib/logsly/colors.rb', line 20 def to_scheme(*args) "#{@name}-#{args.map{|a| a.object_id}.join('-')}".tap do |scheme_name| Logsly::Logging182.color_scheme(scheme_name, ColorsData.new(*args, &@build).to_scheme_opts) end end |