Class: Mushikago::Mitsubachi::Projects
- Inherits:
-
Object
- Object
- Mushikago::Mitsubachi::Projects
- Defined in:
- lib/mushikago/mitsubachi/projects.rb
Instance Attribute Summary (collapse)
-
- (Object) client
readonly
Returns the value of attribute client.
Instance Method Summary (collapse)
- - (Object) [](project_name)
- - (Object) create(project_name, options = {})
- - (Object) each
-
- (Projects) initialize(client)
constructor
A new instance of Projects.
- - (Object) list
Constructor Details
- (Projects) initialize(client)
A new instance of Projects
7 8 9 |
# File 'lib/mushikago/mitsubachi/projects.rb', line 7 def initialize client @client = client end |
Instance Attribute Details
- (Object) client (readonly)
Returns the value of attribute client
5 6 7 |
# File 'lib/mushikago/mitsubachi/projects.rb', line 5 def client @client end |
Instance Method Details
- (Object) [](project_name)
11 12 13 |
# File 'lib/mushikago/mitsubachi/projects.rb', line 11 def [] project_name Mitsubachi::Project.new(client, project_name) end |
- (Object) create(project_name, options = {})
15 16 17 |
# File 'lib/mushikago/mitsubachi/projects.rb', line 15 def create project_name, ={} client.project_create(project_name, ) end |
- (Object) each
23 24 25 |
# File 'lib/mushikago/mitsubachi/projects.rb', line 23 def each list.each end |
- (Object) list
19 20 21 |
# File 'lib/mushikago/mitsubachi/projects.rb', line 19 def list client.project_list['projects'].map{|p| Mitsubachi.Project.new(client, p['name'])} end |