Class: Stringex::Configuration::ActsAsUrl
- Defined in:
- lib/stringex/configuration/acts_as_url.rb
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ActsAsUrl
constructor
A new instance of ActsAsUrl.
- #string_extensions_settings ⇒ Object
Methods inherited from Base
#adapter, configure, system_wide_customizations, unconfigure!
Constructor Details
#initialize(options = {}) ⇒ ActsAsUrl
Returns a new instance of ActsAsUrl.
4 5 6 7 8 9 |
# File 'lib/stringex/configuration/acts_as_url.rb', line 4 def initialize( = {}) if [:scope] [:scope_for_url] = .delete(:scope) end super end |
Class Method Details
.settings ⇒ Object
22 23 24 |
# File 'lib/stringex/configuration/acts_as_url.rb', line 22 def self.settings @settings end |
Instance Method Details
#string_extensions_settings ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/stringex/configuration/acts_as_url.rb', line 11 def string_extensions_settings [ :allow_slash, :exclude, :force_downcase, :limit, :replace_whitespace_with, :truncate_words ].inject(Hash.new){|m, x| m[x] = settings.send(x); m} end |