Class: Tinybucket::Resource::Tags

Inherits:
Base
  • Object
show all
Defined in:
lib/tinybucket/resource/tags.rb

Instance Method Summary collapse

Constructor Details

#initialize(repo, options) ⇒ Tags

Returns a new instance of Tags.



6
7
8
9
# File 'lib/tinybucket/resource/tags.rb', line 6

def initialize(repo, options)
  @repo = repo
  @args = [options]
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Tinybucket::Resource::Base

Instance Method Details

#find(tag, options = {}) ⇒ Tinybucket::Model::Tag

Find the tag

Parameters:

  • tag (String)
  • options (Hash) (defaults to: {})

Returns:



16
17
18
19
20
# File 'lib/tinybucket/resource/tags.rb', line 16

def find(tag, options = {})
  tags_api.find(tag, options).tap do |m|
    inject_repo_keys(m, @repo.repo_keys)
  end
end