Class: ActiveShotgun::Config
- Inherits:
-
Object
- Object
- ActiveShotgun::Config
- Extended by:
- Forwardable
- Includes:
- Singleton
- Defined in:
- lib/active_shotgun/config.rb
Constant Summary collapse
- DEFAULT_CONFIG =
{ shotgun_site_name: 'pasind3-prod', shotgun_site_url: nil, shotgun_client_id: nil, shotgun_client_secret: nil, }.freeze
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #configure {|@config| ... } ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
17 18 19 |
# File 'lib/active_shotgun/config.rb', line 17 def initialize @config = Struct.new(*DEFAULT_CONFIG.keys).new(*DEFAULT_CONFIG.values) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
20 21 22 |
# File 'lib/active_shotgun/config.rb', line 20 def config @config end |
Instance Method Details
#configure {|@config| ... } ⇒ Object
38 39 40 41 42 |
# File 'lib/active_shotgun/config.rb', line 38 def configure(&block) return unless block yield(@config) end |