Class: IMGKit::Configuration
- Inherits:
-
Object
- Object
- IMGKit::Configuration
- Defined in:
- lib/imgkit/configuration.rb
Instance Attribute Summary collapse
-
#default_format ⇒ Object
Returns the value of attribute default_format.
-
#default_options ⇒ Object
Returns the value of attribute default_options.
-
#meta_tag_prefix ⇒ Object
Returns the value of attribute meta_tag_prefix.
-
#wkhtmltoimage ⇒ Object
Returns the value of attribute wkhtmltoimage.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 11 |
# File 'lib/imgkit/configuration.rb', line 5 def initialize @meta_tag_prefix = 'imgkit-' @default_options = {:height => 1000} @default_format = :jpg @wkhtmltoimage ||= (defined?(Bundler::GemfileError) ? `bundle exec which wkhtmltoimage` : `which wkhtmltoimage`).chomp @wkhtmltoimage = '/usr/local/bin/wkhtmltoimage' if @wkhtmltoimage.strip.empty? # Fallback end |
Instance Attribute Details
#default_format ⇒ Object
Returns the value of attribute default_format.
3 4 5 |
# File 'lib/imgkit/configuration.rb', line 3 def default_format @default_format end |
#default_options ⇒ Object
Returns the value of attribute default_options.
3 4 5 |
# File 'lib/imgkit/configuration.rb', line 3 def @default_options end |
#meta_tag_prefix ⇒ Object
Returns the value of attribute meta_tag_prefix.
3 4 5 |
# File 'lib/imgkit/configuration.rb', line 3 def @meta_tag_prefix end |
#wkhtmltoimage ⇒ Object
Returns the value of attribute wkhtmltoimage.
3 4 5 |
# File 'lib/imgkit/configuration.rb', line 3 def wkhtmltoimage @wkhtmltoimage end |