Class: ThumbGen::Generator
- Inherits:
-
Object
- Object
- ThumbGen::Generator
- Includes:
- Utils
- Defined in:
- lib/thumb_gen/generator.rb
Instance Attribute Summary collapse
-
#background_url ⇒ Object
readonly
Returns the value of attribute background_url.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#output_path ⇒ Object
readonly
Returns the value of attribute output_path.
-
#texts ⇒ Object
readonly
Returns the value of attribute texts.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(output_path, background_url, texts, options) ⇒ Generator
constructor
A new instance of Generator.
Methods included from Utils
#draw_text, #split_word_into_lines, #word_too_wide?, #word_wrap
Constructor Details
#initialize(output_path, background_url, texts, options) ⇒ Generator
Returns a new instance of Generator.
12 13 14 15 16 17 |
# File 'lib/thumb_gen/generator.rb', line 12 def initialize(output_path, background_url, texts, ) @output_path = output_path @background_url = background_url @texts = texts @options = end |
Instance Attribute Details
#background_url ⇒ Object (readonly)
Returns the value of attribute background_url.
10 11 12 |
# File 'lib/thumb_gen/generator.rb', line 10 def background_url @background_url end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/thumb_gen/generator.rb', line 10 def @options end |
#output_path ⇒ Object (readonly)
Returns the value of attribute output_path.
10 11 12 |
# File 'lib/thumb_gen/generator.rb', line 10 def output_path @output_path end |
#texts ⇒ Object (readonly)
Returns the value of attribute texts.
10 11 12 |
# File 'lib/thumb_gen/generator.rb', line 10 def texts @texts end |
Instance Method Details
#generate ⇒ Object
19 20 21 |
# File 'lib/thumb_gen/generator.rb', line 19 def generate generate_image end |