Class: Bolt::ModuleInstaller::Puppetfile::GitModule
- Defined in:
- lib/bolt/module_installer/puppetfile/git_module.rb
Instance Attribute Summary collapse
-
#git ⇒ Object
readonly
Returns the value of attribute git.
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
Attributes inherited from Module
Instance Method Summary collapse
-
#initialize(name, git, ref) ⇒ GitModule
constructor
A new instance of GitModule.
-
#to_hash ⇒ Object
Returns a hash that can be used to create a module specification.
-
#to_spec ⇒ Object
Returns a Puppetfile module specification.
Constructor Details
#initialize(name, git, ref) ⇒ GitModule
Returns a new instance of GitModule.
13 14 15 16 17 18 |
# File 'lib/bolt/module_installer/puppetfile/git_module.rb', line 13 def initialize(name, git, ref) super(name) @git = git @ref = ref @type = :git end |
Instance Attribute Details
#git ⇒ Object (readonly)
Returns the value of attribute git.
11 12 13 |
# File 'lib/bolt/module_installer/puppetfile/git_module.rb', line 11 def git @git end |
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
11 12 13 |
# File 'lib/bolt/module_installer/puppetfile/git_module.rb', line 11 def ref @ref end |
Instance Method Details
#to_hash ⇒ Object
Returns a hash that can be used to create a module specification.
28 29 30 31 32 33 |
# File 'lib/bolt/module_installer/puppetfile/git_module.rb', line 28 def to_hash { 'git' => @git, 'ref' => @ref } end |
#to_spec ⇒ Object
Returns a Puppetfile module specification.
22 23 24 |
# File 'lib/bolt/module_installer/puppetfile/git_module.rb', line 22 def to_spec "mod '#{@name}',\n git: '#{@git}',\n ref: '#{@ref}'" end |