Class: Enhance::Config
- Inherits:
-
Object
- Object
- Enhance::Config
- Defined in:
- lib/enhance/config.rb
Instance Attribute Summary collapse
-
#cache ⇒ Object
Returns the value of attribute cache.
-
#command_path ⇒ Object
Returns the value of attribute command_path.
-
#extensions ⇒ Object
Returns the value of attribute extensions.
-
#max_side ⇒ Object
Returns the value of attribute max_side.
-
#quality ⇒ Object
Returns the value of attribute quality.
-
#routes ⇒ Object
readonly
Returns the value of attribute routes.
-
#server ⇒ Object
readonly
Returns the value of attribute server.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #match(route, path) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
5 6 7 8 9 10 11 12 13 |
# File 'lib/enhance/config.rb', line 5 def initialize @routes = {} @quality = 100 @max_side = 1024 @command_path = "#{Paperclip.[:command_path] if defined?(Paperclip)}" @extensions = %w( jpg png jpeg gif ) self.cache = File.join('tmp', 'enhance') end |
Instance Attribute Details
#cache ⇒ Object
Returns the value of attribute cache.
3 4 5 |
# File 'lib/enhance/config.rb', line 3 def cache @cache end |
#command_path ⇒ Object
Returns the value of attribute command_path.
3 4 5 |
# File 'lib/enhance/config.rb', line 3 def command_path @command_path end |
#extensions ⇒ Object
Returns the value of attribute extensions.
3 4 5 |
# File 'lib/enhance/config.rb', line 3 def extensions @extensions end |
#max_side ⇒ Object
Returns the value of attribute max_side.
3 4 5 |
# File 'lib/enhance/config.rb', line 3 def max_side @max_side end |
#quality ⇒ Object
Returns the value of attribute quality.
3 4 5 |
# File 'lib/enhance/config.rb', line 3 def quality @quality end |
#routes ⇒ Object (readonly)
Returns the value of attribute routes.
3 4 5 |
# File 'lib/enhance/config.rb', line 3 def routes @routes end |
#server ⇒ Object (readonly)
Returns the value of attribute server.
3 4 5 |
# File 'lib/enhance/config.rb', line 3 def server @server end |
Instance Method Details
#match(route, path) ⇒ Object
15 16 17 |
# File 'lib/enhance/config.rb', line 15 def match(route, path) @routes[route] = path end |