Class: Netfira::WebConnect::Configuration
- Inherits:
-
Object
- Object
- Netfira::WebConnect::Configuration
- Defined in:
- lib/netfira/web_connect/configuration.rb
Instance Attribute Summary collapse
-
#amqp ⇒ Object
Returns the value of attribute amqp.
-
#authenticator ⇒ Object
Returns the value of attribute authenticator.
-
#custom_fields ⇒ Object
Returns the value of attribute custom_fields.
-
#db ⇒ Object
Returns the value of attribute db.
-
#db_table_prefix ⇒ Object
Returns the value of attribute db_table_prefix.
-
#file_store ⇒ Object
Returns the value of attribute file_store.
-
#http_notifications ⇒ Object
Returns the value of attribute http_notifications.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#materialize_when_db_changed ⇒ Object
Returns the value of attribute materialize_when_db_changed.
-
#paranoia ⇒ Object
Returns the value of attribute paranoia.
-
#session_lifetime ⇒ Object
Returns the value of attribute session_lifetime.
-
#time_zone ⇒ Object
Returns the value of attribute time_zone.
Instance Method Summary collapse
-
#initialize(defaults = nil) ⇒ Configuration
constructor
A new instance of Configuration.
- #on_authenticate(proc = nil, &block) ⇒ Object
Constructor Details
#initialize(defaults = nil) ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 |
# File 'lib/netfira/web_connect/configuration.rb', line 9 def initialize(defaults = nil) defaults.each{ |k, v| __send__ :"#{k}=", v } if defaults end |
Instance Attribute Details
#amqp ⇒ Object
Returns the value of attribute amqp.
7 8 9 |
# File 'lib/netfira/web_connect/configuration.rb', line 7 def amqp @amqp end |
#authenticator ⇒ Object
Returns the value of attribute authenticator.
4 5 6 |
# File 'lib/netfira/web_connect/configuration.rb', line 4 def authenticator @authenticator end |
#custom_fields ⇒ Object
Returns the value of attribute custom_fields.
4 5 6 |
# File 'lib/netfira/web_connect/configuration.rb', line 4 def custom_fields @custom_fields end |
#db ⇒ Object
Returns the value of attribute db.
7 8 9 |
# File 'lib/netfira/web_connect/configuration.rb', line 7 def db @db end |
#db_table_prefix ⇒ Object
Returns the value of attribute db_table_prefix.
4 5 6 |
# File 'lib/netfira/web_connect/configuration.rb', line 4 def db_table_prefix @db_table_prefix end |
#file_store ⇒ Object
Returns the value of attribute file_store.
4 5 6 |
# File 'lib/netfira/web_connect/configuration.rb', line 4 def file_store @file_store end |
#http_notifications ⇒ Object
Returns the value of attribute http_notifications.
7 8 9 |
# File 'lib/netfira/web_connect/configuration.rb', line 7 def http_notifications @http_notifications end |
#logger ⇒ Object
Returns the value of attribute logger.
7 8 9 |
# File 'lib/netfira/web_connect/configuration.rb', line 7 def logger @logger end |
#materialize_when_db_changed ⇒ Object
Returns the value of attribute materialize_when_db_changed.
4 5 6 |
# File 'lib/netfira/web_connect/configuration.rb', line 4 def materialize_when_db_changed @materialize_when_db_changed end |
#paranoia ⇒ Object
Returns the value of attribute paranoia.
4 5 6 |
# File 'lib/netfira/web_connect/configuration.rb', line 4 def paranoia @paranoia end |
#session_lifetime ⇒ Object
Returns the value of attribute session_lifetime.
4 5 6 |
# File 'lib/netfira/web_connect/configuration.rb', line 4 def session_lifetime @session_lifetime end |
#time_zone ⇒ Object
Returns the value of attribute time_zone.
4 5 6 |
# File 'lib/netfira/web_connect/configuration.rb', line 4 def time_zone @time_zone end |
Instance Method Details
#on_authenticate(proc = nil, &block) ⇒ Object
13 14 15 16 17 |
# File 'lib/netfira/web_connect/configuration.rb', line 13 def on_authenticate(proc = nil, &block) authenticator = proc || block raise 'Authenticator must take exactly two arguments (shop ID and password)' unless authenticator.arity == 2 self.authenticator = authenticator end |