Module: Resizing::Configurable
- Included in:
- Client
- Defined in:
- lib/resizing/configurable.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(mod) ⇒ Object
5 6 7 |
# File 'lib/resizing/configurable.rb', line 5 def self.included mod mod.send(:attr_reader, :config) end |
Instance Method Details
#initialize_config(*attrs) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/resizing/configurable.rb', line 9 def initialize_config *attrs config = if attrs.first.is_a? Configuration attrs.first elsif attrs.first.nil? Resizing.configure else Configuration.new(*attrs) end instance_variable_set :@config, config end |