Class: ApplicationTemplate

Inherits:
OpenShift::UserModel
  • Object
show all
Defined in:
app/models/application_template.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(display_name = nil, descriptor_yaml = nil, git_url = nil, tags = [], gear_cost = 0, metadata = {}) ⇒ ApplicationTemplate

Returns a new instance of ApplicationTemplate.



5
6
7
8
9
# File 'app/models/application_template.rb', line 5

def initialize(display_name=nil,descriptor_yaml=nil,git_url=nil,tags=[], gear_cost=0,  = {})
  self.display_name, self.descriptor_yaml, self.git_url, self.tags, self.gear_cost, self. =
    display_name, descriptor_yaml, git_url, tags, gear_cost, 
    self.uuid = OpenShift::Model.gen_uuid
end

Instance Attribute Details

#descriptor_yamlObject

Returns the value of attribute descriptor_yaml.



2
3
4
# File 'app/models/application_template.rb', line 2

def descriptor_yaml
  @descriptor_yaml
end

#display_nameObject

Returns the value of attribute display_name.



2
3
4
# File 'app/models/application_template.rb', line 2

def display_name
  @display_name
end

#gear_costObject

Returns the value of attribute gear_cost.



2
3
4
# File 'app/models/application_template.rb', line 2

def gear_cost
  @gear_cost
end

#git_urlObject

Returns the value of attribute git_url.



2
3
4
# File 'app/models/application_template.rb', line 2

def git_url
  @git_url
end

#metadataObject

Returns the value of attribute metadata.



2
3
4
# File 'app/models/application_template.rb', line 2

def 
  @metadata
end

#tagsObject

Returns the value of attribute tags.



2
3
4
# File 'app/models/application_template.rb', line 2

def tags
  @tags
end

#uuidObject

Returns the value of attribute uuid.



2
3
4
# File 'app/models/application_template.rb', line 2

def uuid
  @uuid
end

Class Method Details

.find(id) ⇒ Object



11
12
13
# File 'app/models/application_template.rb', line 11

def self.find(id)
  super(nil,id)
end

.find_all(tag = nil) ⇒ Object



15
16
17
18
# File 'app/models/application_template.rb', line 15

def self.find_all(tag=nil)
  tag = {:tag => tag} unless tag.nil?
  super(nil,tag)
end

Instance Method Details

#deleteObject



24
25
26
# File 'app/models/application_template.rb', line 24

def delete
  super(nil)
end

#saveObject



20
21
22
# File 'app/models/application_template.rb', line 20

def save
  super(nil)
end