Class: EYCli::Model::App

Inherits:
Base
  • Object
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

Methods included from SmartyParser

#parse, #smarty

Class Method Details

.create_collection_path(hash) ⇒ Object

Raises:

  • (Faraday::Error::ClientError)


8
9
10
11
12
# File 'lib/ey_cli/models/app.rb', line 8

def self.create_collection_path(hash)
   = hash.delete(:account)
  raise Faraday::Error::ClientError, {:body => MultiJson.encode({:errors => {:account => 'Not found'}})} unless 
  (.class.base_path + '/%s/apps') % .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