Class: Appydave::Tools::Dam::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/appydave/tools/dam/status.rb

Overview

Show unified status for video project (local, S3, SSD, git)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(brand, project_id = nil) ⇒ Status



12
13
14
15
16
17
18
# File 'lib/appydave/tools/dam/status.rb', line 12

def initialize(brand, project_id = nil)
  @brand_info = load_brand_info(brand)
  @brand = @brand_info.key
  @brand_path = Config.brand_path(@brand)
  @project_id = project_id
  @project_path = project_id ? resolve_project_path(project_id) : nil
end

Instance Attribute Details

#brandObject (readonly)

Returns the value of attribute brand.



10
11
12
# File 'lib/appydave/tools/dam/status.rb', line 10

def brand
  @brand
end

#brand_infoObject (readonly)

Returns the value of attribute brand_info.



10
11
12
# File 'lib/appydave/tools/dam/status.rb', line 10

def brand_info
  @brand_info
end

#brand_pathObject (readonly)

Returns the value of attribute brand_path.



10
11
12
# File 'lib/appydave/tools/dam/status.rb', line 10

def brand_path
  @brand_path
end

#project_idObject (readonly)

Returns the value of attribute project_id.



10
11
12
# File 'lib/appydave/tools/dam/status.rb', line 10

def project_id
  @project_id
end

#project_pathObject (readonly)

Returns the value of attribute project_path.



10
11
12
# File 'lib/appydave/tools/dam/status.rb', line 10

def project_path
  @project_path
end

Instance Method Details

#showObject

Show status for project or brand



21
22
23
24
25
26
27
# File 'lib/appydave/tools/dam/status.rb', line 21

def show
  if project_id
    show_project_status
  else
    show_brand_status
  end
end