Module: DecoratorDryer
- Defined in:
- lib/decorator_dryer.rb,
lib/decorator_dryer/version.rb,
lib/decorator_dryer/shortcuts.rb,
lib/decorator_dryer/formatters.rb,
lib/decorator_dryer/configuration.rb,
lib/decorator_dryer/active_storage_shortcuts.rb
Defined Under Namespace
Modules: ActiveStorageShortcuts, Formatters, Shortcuts Classes: Configuration
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
- .configuration ⇒ Object
- .configure {|DecoratorDryer.configuration| ... } ⇒ Object
- .included(klass) ⇒ Object
Class Method Details
.configuration ⇒ Object
24 25 26 |
# File 'lib/decorator_dryer.rb', line 24 def self.configuration @configuration ||= DecoratorDryer::Configuration.new end |
.configure {|DecoratorDryer.configuration| ... } ⇒ Object
28 29 30 |
# File 'lib/decorator_dryer.rb', line 28 def self.configure yield DecoratorDryer.configuration end |
.included(klass) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/decorator_dryer.rb', line 11 def self.included(klass) klass.include(DecoratorDryer::Formatters) klass.include(DecoratorDryer::Shortcuts) if DecoratorDryer.configuration..mode == :active_storage klass.include(DecoratorDryer::ActiveStorageShortcuts) end DecoratorDryer.configuration.extensions.each do |extension| klass.include(extension) end end |