class Toptranslation::Resource::ProjectList

Public Class Methods

new(connection, options = {}) click to toggle source
# File lib/toptranslation/resource/project_list.rb, line 5
def initialize(connection, options = {})
  @connection = connection
  @options = options
end

Public Instance Methods

create(options = {}) click to toggle source
# File lib/toptranslation/resource/project_list.rb, line 15
def create(options = {})
  Project.new(@connection, options)
end
each() { |project| ... } click to toggle source
# File lib/toptranslation/resource/project_list.rb, line 19
def each
  projects.each { |project| yield Project.new(@connection, project) }
end
find(identifier) click to toggle source
# File lib/toptranslation/resource/project_list.rb, line 10
def find(identifier)
  result = @connection.get("/projects/#{identifier}")
  Project.new(@connection, result)
end

Private Instance Methods

projects() click to toggle source
# File lib/toptranslation/resource/project_list.rb, line 25
def projects
  @connection.get('/projects')
end