Class: Callisto::Configuration
- Inherits:
-
Object
- Object
- Callisto::Configuration
- Defined in:
- lib/callisto/configuration.rb
Defined Under Namespace
Modules: Defaults
Instance Attribute Summary collapse
-
#thumbnail_defaults ⇒ Object
Returns the value of attribute thumbnail_defaults.
Instance Method Summary collapse
- #bin_path=(val) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #max_workers=(val) ⇒ Object
- #method_missing(method, *args, &block) ⇒ Object
- #reset ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
25 26 27 |
# File 'lib/callisto/configuration.rb', line 25 def initialize reset end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/callisto/configuration.rb', line 43 def method_missing(method, *args, &block) if /^thumbnail_(?<name>[a-z\_]+)(?<setter>=)?/ =~ method if setter self.thumbnail_defaults[name.to_sym] = args.first else thumbnail_defaults[name.to_sym] end else super(method, *args, &block) end end |
Instance Attribute Details
#thumbnail_defaults ⇒ Object
Returns the value of attribute thumbnail_defaults.
23 24 25 |
# File 'lib/callisto/configuration.rb', line 23 def thumbnail_defaults @thumbnail_defaults end |