Class: Txgh::Config::Providers::GitProvider
- Inherits:
-
Object
- Object
- Txgh::Config::Providers::GitProvider
- Defined in:
- lib/txgh/config/providers/git_provider.rb
Constant Summary collapse
- SCHEME =
'git'
Instance Attribute Summary collapse
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
Class Method Summary collapse
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(payload, parser, options = {}) ⇒ GitProvider
constructor
A new instance of GitProvider.
Constructor Details
#initialize(payload, parser, options = {}) ⇒ GitProvider
23 24 25 26 27 28 |
# File 'lib/txgh/config/providers/git_provider.rb', line 23 def initialize(payload, parser, = {}) @payload = payload @parser = parser @ref = [:ref] @github_repo = [:github_repo] end |
Instance Attribute Details
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
21 22 23 |
# File 'lib/txgh/config/providers/git_provider.rb', line 21 def parser @parser end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
21 22 23 |
# File 'lib/txgh/config/providers/git_provider.rb', line 21 def payload @payload end |
Class Method Details
.load(payload, parser, options = {}) ⇒ Object
12 13 14 |
# File 'lib/txgh/config/providers/git_provider.rb', line 12 def load(payload, parser, = {}) new(payload, parser, ).config end |
.scheme ⇒ Object
16 17 18 |
# File 'lib/txgh/config/providers/git_provider.rb', line 16 def scheme SCHEME end |
.supports?(scheme) ⇒ Boolean
8 9 10 |
# File 'lib/txgh/config/providers/git_provider.rb', line 8 def supports?(scheme) scheme == SCHEME end |
Instance Method Details
#config ⇒ Object
30 31 32 |
# File 'lib/txgh/config/providers/git_provider.rb', line 30 def config parser.load(download) end |