Class: Octopi::Tag
Constant Summary
Constant Summary
Constants inherited from Base
Instance Attribute Summary (collapse)
-
- (Object) name
Returns the value of attribute name.
-
- (Object) sha
Returns the value of attribute sha.
Attributes inherited from Base
Class Method Summary (collapse)
Instance Method Summary (collapse)
-
- (Tag) initialize(*args)
constructor
A new instance of Tag.
Methods included from Resource
Methods inherited from Base
Constructor Details
- (Tag) initialize(*args)
A new instance of Tag
10 11 12 13 14 |
# File 'lib/octopi/tag.rb', line 10 def initialize(*args) args = args.flatten! self.name = args.first self.sha = args.last end |
Instance Attribute Details
- (Object) name
Returns the value of attribute name
5 6 7 |
# File 'lib/octopi/tag.rb', line 5 def name @name end |
- (Object) sha
Returns the value of attribute sha
5 6 7 |
# File 'lib/octopi/tag.rb', line 5 def sha @sha end |
Class Method Details
+ (Object) all(options = {})
16 17 18 19 20 21 |
# File 'lib/octopi/tag.rb', line 16 def self.all(={}) ensure_hash() user, repo = gather_details() self.validate_args(user => :user, repo => :repo) find_plural([user, repo, 'tags'], :resource) { |i| Tag.new(i) } end |