Class: Txgh::Config::ProviderInstance
- Inherits:
-
Object
- Object
- Txgh::Config::ProviderInstance
- Defined in:
- lib/txgh/config/provider_instance.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
Instance Method Summary collapse
- #default? ⇒ Boolean
-
#initialize(provider, parser, options = {}) ⇒ ProviderInstance
constructor
A new instance of ProviderInstance.
- #load(payload, options = {}) ⇒ Object
- #supports?(*args) ⇒ Boolean
Constructor Details
#initialize(provider, parser, options = {}) ⇒ ProviderInstance
Returns a new instance of ProviderInstance.
6 7 8 9 10 |
# File 'lib/txgh/config/provider_instance.rb', line 6 def initialize(provider, parser, = {}) @provider = provider @parser = parser @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/txgh/config/provider_instance.rb', line 4 def @options end |
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
4 5 6 |
# File 'lib/txgh/config/provider_instance.rb', line 4 def parser @parser end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
4 5 6 |
# File 'lib/txgh/config/provider_instance.rb', line 4 def provider @provider end |
Instance Method Details
#default? ⇒ Boolean
20 21 22 |
# File 'lib/txgh/config/provider_instance.rb', line 20 def default? !!([:default]) end |
#load(payload, options = {}) ⇒ Object
16 17 18 |
# File 'lib/txgh/config/provider_instance.rb', line 16 def load(payload, = {}) provider.load(payload, parser, ) end |
#supports?(*args) ⇒ Boolean
12 13 14 |
# File 'lib/txgh/config/provider_instance.rb', line 12 def supports?(*args) provider.supports?(*args) end |