Class: Tinybucket::Resource::Projects

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(owner_name, options = {}) ⇒ Projects

Initialize

Parameters:

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


12
13
14
15
# File 'lib/tinybucket/resource/projects.rb', line 12

def initialize(owner_name, options = {})
  @owner = owner_name
  @args = [options]
end

Dynamic Method Handling

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

Instance Attribute Details

#ownerObject

Returns the value of attribute owner.



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

def owner
  @owner
end

Instance Method Details

#create(_params) ⇒ Object

Create a new project

NOTE: Not Implemented yet.

Parameters:

  • _params (Hash)

Raises:

  • (NotImplementedError)

    to be implemented



32
33
34
# File 'lib/tinybucket/resource/projects.rb', line 32

def create(_params)
  raise NotImplementedError
end

#find(project_key, options = {}) ⇒ Tinybucket::Model::Project

Find the project

Parameters:

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

Returns:



22
23
24
# File 'lib/tinybucket/resource/projects.rb', line 22

def find(project_key, options = {})
  projects_api.find(project_key, options)
end