Class: Ra10ke::Duplicates::Verification::Module
- Inherits:
-
Struct
- Object
- Struct
- Ra10ke::Duplicates::Verification::Module
- Defined in:
- lib/ra10ke/duplicates.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#name ⇒ Object
Returns the value of attribute name.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
Instance Method Summary collapse
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args
35 36 37 |
# File 'lib/ra10ke/duplicates.rb', line 35 def args @args end |
#name ⇒ Object
Returns the value of attribute name
35 36 37 |
# File 'lib/ra10ke/duplicates.rb', line 35 def name @name end |
#namespace ⇒ Object
Returns the value of attribute namespace
35 36 37 |
# File 'lib/ra10ke/duplicates.rb', line 35 def namespace @namespace end |
Instance Method Details
#forge? ⇒ Boolean
40 41 42 |
# File 'lib/ra10ke/duplicates.rb', line 40 def forge? !git? end |
#git? ⇒ Boolean
36 37 38 |
# File 'lib/ra10ke/duplicates.rb', line 36 def git? args.key? :git end |
#to_s ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/ra10ke/duplicates.rb', line 48 def to_s str = "#{[namespace, name].compact.join '/'}" if git? ref = args[:ref] || args[:tag] || args[:branch] ref_type = (args[:ref] && 'ref') || (args[:tag] && 'tag') || (args[:branch] && 'branch') str += " from git on the #{ref_type} #{ref} at #{args[:git]}" elsif args.key? :version str += " from the forge at version #{args[:version]}" end str end |
#type ⇒ Object
44 45 46 |
# File 'lib/ra10ke/duplicates.rb', line 44 def type git? ? 'git' : 'forge' end |