Class: Txgh::Config::ProviderInstance

Inherits:
Object
  • Object
show all
Defined in:
lib/txgh/config/provider_instance.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = {})
  @provider = provider
  @parser = parser
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/txgh/config/provider_instance.rb', line 4

def options
  @options
end

#parserObject (readonly)

Returns the value of attribute parser.



4
5
6
# File 'lib/txgh/config/provider_instance.rb', line 4

def parser
  @parser
end

#providerObject (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

Returns:

  • (Boolean)


20
21
22
# File 'lib/txgh/config/provider_instance.rb', line 20

def default?
  !!(options[:default])
end

#load(payload, options = {}) ⇒ Object



16
17
18
# File 'lib/txgh/config/provider_instance.rb', line 16

def load(payload, options = {})
  provider.load(payload, parser, options)
end

#supports?(*args) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/txgh/config/provider_instance.rb', line 12

def supports?(*args)
  provider.supports?(*args)
end