Module: Inker
- Defined in:
- lib/inker.rb,
lib/inker/color.rb,
lib/inker/version.rb,
lib/inker/color/tools.rb,
lib/inker/color/serializers.rb
Overview
The main module of the gem, which loads all necessary classes and provides a helper for Color object generation from a string and for named colors map.
Defined Under Namespace
Classes: Color
Constant Summary collapse
- VERSION =
Inker gem version
"0.1.0"
Class Method Summary collapse
-
.color(str) ⇒ Inker::Color
Creates a new instance of Color, which could be used for color manipulation or for collecting color info.
-
.named_colors ⇒ Hash
Returns the map of named colors and their respective HEX representation.
Class Method Details
.color(str) ⇒ Inker::Color
Creates a new instance of Color, which could be used for color manipulation or for collecting color info.
18 19 20 |
# File 'lib/inker.rb', line 18 def color(str) Color.new(str) end |
.named_colors ⇒ Hash
Returns the map of named colors and their respective HEX representation.
26 27 28 |
# File 'lib/inker.rb', line 26 def named_colors @named_colors ||= YAML.load_file(File.('../data/colors.yml', __FILE__)) end |