Class: R10K::Module::Git
- Extended by:
- Forwardable
- Defined in:
- lib/r10k/module/git.rb
Instance Attribute Summary collapse
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
Attributes inherited from Base
#dirname, #name, #owner, #path, #title
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(title, dirname, args) ⇒ Git
constructor
A new instance of Git.
- #properties ⇒ Object
- #version ⇒ Object
Methods inherited from Base
#accept, #full_path, #status, #sync
Constructor Details
#initialize(title, dirname, args) ⇒ Git
Returns a new instance of Git.
21 22 23 24 25 |
# File 'lib/r10k/module/git.rb', line 21 def initialize(title, dirname, args) super (@args) @repo = R10K::Git::StatefulRepository.new(@ref, @remote, @dirname, @name) end |
Instance Attribute Details
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
19 20 21 |
# File 'lib/r10k/module/git.rb', line 19 def repo @repo end |
Class Method Details
.implement?(name, args) ⇒ Boolean
10 11 12 13 14 |
# File 'lib/r10k/module/git.rb', line 10 def self.implement?(name, args) args.is_a? Hash and args.has_key?(:git) rescue false end |
Instance Method Details
#properties ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/r10k/module/git.rb', line 31 def properties { :expected => @ref, :actual => (@repo.head || "(unresolvable)"), :type => :git, } end |
#version ⇒ Object
27 28 29 |
# File 'lib/r10k/module/git.rb', line 27 def version @ref end |