Module: Mingle
- Defined in:
- lib/mingle.rb,
app/models/mingle.rb,
lib/mingle/engine.rb,
lib/mingle/version.rb,
lib/mingle/configuration.rb
Defined Under Namespace
Modules: Concerns, Facebook, Instagram, Twitter Classes: Configuration, Engine, Hashtag, Hashtagging, InstallGenerator
Constant Summary collapse
- VERSION =
"0.4.0"
Class Method Summary collapse
- .config ⇒ Object
- .configure {|config| ... } ⇒ Object
- .table_name_prefix ⇒ Object
-
.temporarily(options = {}) ⇒ Object
Set temporary configuration options for the duration of the given block.
Class Method Details
.config ⇒ Object
15 16 17 |
# File 'lib/mingle.rb', line 15 def config @config ||= Mingle::Configuration.new end |
.configure {|config| ... } ⇒ Object
11 12 13 |
# File 'lib/mingle.rb', line 11 def configure yield config end |
.table_name_prefix ⇒ Object
2 3 4 |
# File 'app/models/mingle.rb', line 2 def self.table_name_prefix 'mingle_' end |
.temporarily(options = {}) ⇒ Object
Set temporary configuration options for the duration of the given block.
options - A Hash describing temporary configuration options.
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/mingle.rb', line 22 def temporarily = {} original = @config.dup .each do |key, value| @config.send "#{key}=", value end yield ensure @config = original end |