Class: Jekyll::Gensocial::ImageCreator::TextLayerConfig
- Inherits:
-
Object
- Object
- Jekyll::Gensocial::ImageCreator::TextLayerConfig
- Defined in:
- lib/jekyll-gensocial/image_creator/text_layer_config.rb
Instance Attribute Summary collapse
-
#fill ⇒ Object
readonly
Returns the value of attribute fill.
-
#font_path ⇒ Object
readonly
Returns the value of attribute font_path.
-
#pointsize ⇒ Object
readonly
Returns the value of attribute pointsize.
-
#rect ⇒ Object
readonly
Returns the value of attribute rect.
-
#string ⇒ Object
readonly
Returns the value of attribute string.
Instance Method Summary collapse
-
#initialize(hash, base_path:) ⇒ TextLayerConfig
constructor
A new instance of TextLayerConfig.
Constructor Details
#initialize(hash, base_path:) ⇒ TextLayerConfig
Returns a new instance of TextLayerConfig.
9 10 11 12 13 14 15 |
# File 'lib/jekyll-gensocial/image_creator/text_layer_config.rb', line 9 def initialize(hash, base_path:) @string = hash["string"] @font_path = File.join(base_path, hash["font_path"]) unless hash["font_path"].nil? @pointsize = hash["pointsize"] @fill = hash["fill"] @rect = Geometry::Rect.new(hash["rect"]) end |
Instance Attribute Details
#fill ⇒ Object (readonly)
Returns the value of attribute fill.
7 8 9 |
# File 'lib/jekyll-gensocial/image_creator/text_layer_config.rb', line 7 def fill @fill end |
#font_path ⇒ Object (readonly)
Returns the value of attribute font_path.
7 8 9 |
# File 'lib/jekyll-gensocial/image_creator/text_layer_config.rb', line 7 def font_path @font_path end |
#pointsize ⇒ Object (readonly)
Returns the value of attribute pointsize.
7 8 9 |
# File 'lib/jekyll-gensocial/image_creator/text_layer_config.rb', line 7 def pointsize @pointsize end |
#rect ⇒ Object (readonly)
Returns the value of attribute rect.
7 8 9 |
# File 'lib/jekyll-gensocial/image_creator/text_layer_config.rb', line 7 def rect @rect end |
#string ⇒ Object (readonly)
Returns the value of attribute string.
7 8 9 |
# File 'lib/jekyll-gensocial/image_creator/text_layer_config.rb', line 7 def string @string end |