Class: Appydave::Tools::NameManager::ProjectName
- Inherits:
-
Object
- Object
- Appydave::Tools::NameManager::ProjectName
- 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
-
#channel_code ⇒ Object
Returns the value of attribute channel_code.
-
#project_name ⇒ Object
Returns the value of attribute project_name.
-
#sequence ⇒ Object
Returns the value of attribute sequence.
Instance Method Summary collapse
- #generate_name ⇒ Object
-
#initialize(file_name) ⇒ ProjectName
constructor
A new instance of ProjectName.
Methods included from Configuration::Configurable
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_code ⇒ Object
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_name ⇒ Object
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 |
#sequence ⇒ Object
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_name ⇒ Object
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 |