Exception: R10K::Git::UnresolvableRefError
- Defined in:
- lib/r10k/git/errors.rb
Constant Summary collapse
- HASHLIKE =
%r[[A-Fa-f0-9]]
Instance Attribute Summary collapse
-
#git_dir ⇒ Object
readonly
Returns the value of attribute git_dir.
-
#ref ⇒ Object
readonly
Returns the value of attribute ref.
Instance Method Summary collapse
-
#initialize(*args) ⇒ UnresolvableRefError
constructor
A new instance of UnresolvableRefError.
-
#message ⇒ Object
Print a friendly error message if an object hash is given as the message.
Constructor Details
#initialize(*args) ⇒ UnresolvableRefError
Returns a new instance of UnresolvableRefError.
14 15 16 17 18 19 |
# File 'lib/r10k/git/errors.rb', line 14 def initialize(*args) super @hash = @options[:ref] @git_dir = @options[:git_dir] end |
Instance Attribute Details
#git_dir ⇒ Object (readonly)
Returns the value of attribute git_dir.
12 13 14 |
# File 'lib/r10k/git/errors.rb', line 12 def git_dir @git_dir end |
#ref ⇒ Object (readonly)
Returns the value of attribute ref.
11 12 13 |
# File 'lib/r10k/git/errors.rb', line 11 def ref @ref end |
Instance Method Details
#message ⇒ Object
Print a friendly error message if an object hash is given as the message
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/r10k/git/errors.rb', line 24 def if @mesg msg = @mesg else msg = "Could not locate hash" if @hash msg << " '#{@hash}'" end end if @git_dir msg << " at #{@git_dir}" end msg end |