Module: MontageRails
- Defined in:
- lib/montage_rails.rb,
lib/montage_rails/base.rb,
lib/montage_rails/errors.rb,
lib/montage_rails/version.rb,
lib/montage_rails/relation.rb,
lib/montage_rails/base/column.rb,
lib/montage_rails/query_cache.rb,
lib/montage_rails/log_subscriber.rb
Defined Under Namespace
Classes: AttributeMissingError, Base, LogSubscriber, MontageAPIError, QueryCache, Relation, RelationError
Constant Summary collapse
- VERSION =
"0.4.10"
Class Attribute Summary collapse
-
.domain ⇒ Object
Returns the value of attribute domain.
-
.no_caching ⇒ Object
Returns the value of attribute no_caching.
-
.password ⇒ Object
Returns the value of attribute password.
-
.token ⇒ Object
Returns the value of attribute token.
-
.username ⇒ Object
Returns the value of attribute username.
Class Method Summary collapse
Class Attribute Details
.domain ⇒ Object
Returns the value of attribute domain.
13 14 15 |
# File 'lib/montage_rails.rb', line 13 def domain @domain end |
.no_caching ⇒ Object
Returns the value of attribute no_caching.
13 14 15 |
# File 'lib/montage_rails.rb', line 13 def no_caching @no_caching end |
.password ⇒ Object
Returns the value of attribute password.
13 14 15 |
# File 'lib/montage_rails.rb', line 13 def password @password end |
.token ⇒ Object
Returns the value of attribute token.
13 14 15 |
# File 'lib/montage_rails.rb', line 13 def token @token end |
.username ⇒ Object
Returns the value of attribute username.
13 14 15 |
# File 'lib/montage_rails.rb', line 13 def username @username end |
Class Method Details
.configure {|_self| ... } ⇒ Object
15 16 17 18 19 |
# File 'lib/montage_rails.rb', line 15 def configure yield self validate get_token unless token end |
.connection ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/montage_rails.rb', line 21 def connection @connection ||= begin Montage::Client.new do |c| c.token = token c.domain = domain end end end |
.notify(caller, &block) ⇒ Object
30 31 32 33 34 |
# File 'lib/montage_rails.rb', line 30 def notify(caller, &block) ActiveSupport::Notifications.instrument("reql.montage_rails", caller.payload) do yield end end |