Class: Deploio::AppRef

Inherits:
Object
  • Object
show all
Defined in:
lib/deploio/app_ref.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input, available_apps: {}) ⇒ AppRef

The input is given in the format "-"



11
12
13
14
# File 'lib/deploio/app_ref.rb', line 11

def initialize(input, available_apps: {})
  @input = input.to_s
  parse_from_available_apps(available_apps)
end

Instance Attribute Details

#app_nameObject (readonly)

Returns the value of attribute app_name.



8
9
10
# File 'lib/deploio/app_ref.rb', line 8

def app_name
  @app_name
end

#project_nameObject (readonly)

Returns the value of attribute project_name.



8
9
10
# File 'lib/deploio/app_ref.rb', line 8

def project_name
  @project_name
end

Instance Method Details

#==(other) ⇒ Object



24
25
26
27
28
# File 'lib/deploio/app_ref.rb', line 24

def ==(other)
  return false unless other.is_a?(AppRef)

  project_name == other.project_name && app_name == other.app_name
end

#full_nameObject



16
17
18
# File 'lib/deploio/app_ref.rb', line 16

def full_name
  "#{project_name}-#{app_name}"
end

#to_sObject



20
21
22
# File 'lib/deploio/app_ref.rb', line 20

def to_s
  full_name
end