Class: CircleCI::CLI::Response::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/circleci/cli/response/project.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Project

Returns a new instance of Project.



7
8
9
# File 'lib/circleci/cli/response/project.rb', line 7

def initialize(hash)
  @hash = hash
end

Class Method Details

.allObject



15
16
17
# File 'lib/circleci/cli/response/project.rb', line 15

def self.all
  CircleCi::Projects.new.get.body.map { |p| Project.new(p) }
end

Instance Method Details

#informationObject



11
12
13
# File 'lib/circleci/cli/response/project.rb', line 11

def information
  [@hash['username'], @hash['reponame']]
end