Class: EYCli::Model::App
- Inherits:
-
Base
- Object
- Hashie::Mash
- Base
- EYCli::Model::App
show all
- Defined in:
- lib/ey_cli/models/app.rb
Class Method Summary
collapse
Methods inherited from Base
all, base_path, child_path, class_name, collection_path, #convert_value, create, find, find_by_name, resolve_child_path
#parse, #smarty
Class Method Details
.create_collection_path(hash) ⇒ Object
8
9
10
11
12
|
# File 'lib/ey_cli/models/app.rb', line 8
def self.create_collection_path(hash)
account = hash.delete(:account)
raise Faraday::Error::ClientError, {:body => MultiJson.encode({:errors => {:account => 'Not found'}})} unless account
(account.class.base_path + '/%s/apps') % account.id
end
|
.find_by_repository_uri(repository_uri, collection = all) ⇒ Object
4
5
6
|
# File 'lib/ey_cli/models/app.rb', line 4
def self.find_by_repository_uri(repository_uri, collection = all)
collection.find {|resource| resource.repository_uri == repository_uri}
end
|