Class: Shrimp::Configuration
- Inherits:
-
Object
- Object
- Shrimp::Configuration
- Defined in:
- lib/shrimp/configuration.rb
Instance Attribute Summary collapse
-
#default_options ⇒ Object
Returns the value of attribute default_options.
- #phantomjs ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/shrimp/configuration.rb', line 14 def initialize @default_options = { :format => 'A4', :margin => '1cm', :zoom => 1, :orientation => 'portrait', :tmpdir => Dir.tmpdir, :rendering_timeout => 90000, :rendering_time => 1000, :command_config_file => File.('../config.json', __FILE__), :viewport_width => 600, :viewport_height => 600, :max_redirect_count => 0 } end |
Instance Attribute Details
#default_options ⇒ Object
Returns the value of attribute default_options.
5 6 7 |
# File 'lib/shrimp/configuration.rb', line 5 def @default_options end |
#phantomjs ⇒ Object
30 31 32 |
# File 'lib/shrimp/configuration.rb', line 30 def phantomjs @phantomjs ||= (defined?(Bundler::GemfileError) ? `bundle exec which phantomjs` : `which phantomjs`).chomp end |