Class: Appydave::Tools::NameManager::ProjectName

Inherits:
Object
  • Object
show all
Includes:
Configuration::Configurable
Defined in:
lib/appydave/tools/name_manager/project_name.rb

Overview

Parses and generates project names for Appydave video projects

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Configuration::Configurable

#config

Constructor Details

#initialize(file_name) ⇒ ProjectName

Returns a new instance of ProjectName.



14
15
16
# File 'lib/appydave/tools/name_manager/project_name.rb', line 14

def initialize(file_name)
  parse_file_name(file_name)
end

Instance Attribute Details

#channel_codeObject

Returns the value of attribute channel_code.



12
13
14
# File 'lib/appydave/tools/name_manager/project_name.rb', line 12

def channel_code
  @channel_code
end

#project_nameObject

Returns the value of attribute project_name.



11
12
13
# File 'lib/appydave/tools/name_manager/project_name.rb', line 11

def project_name
  @project_name
end

#sequenceObject

Returns the value of attribute sequence.



11
12
13
# File 'lib/appydave/tools/name_manager/project_name.rb', line 11

def sequence
  @sequence
end

Instance Method Details

#generate_nameObject



18
19
20
21
22
23
24
# File 'lib/appydave/tools/name_manager/project_name.rb', line 18

def generate_name
  if channel_code
    "#{sequence}-#{channel_code}-#{project_name}"
  else
    "#{sequence}-#{project_name}"
  end.downcase
end