Module: Inferno::Utils::NamedThorActions
- Included in:
- CLI::New
- Defined in:
- lib/inferno/utils/named_thor_actions.rb
Constant Summary collapse
- INFLECTOR =
Dry::Inflector.new
Instance Method Summary collapse
-
#human_name ⇒ Object
-
#library_name ⇒ Object
-
#module_name ⇒ Object
-
#root_name ⇒ Object
-
#test_kit_id ⇒ Object
-
#test_suite_id ⇒ Object
-
#title_name ⇒ Object
Instance Method Details
#human_name ⇒ Object
20 21 22 |
# File 'lib/inferno/utils/named_thor_actions.rb', line 20 def human_name INFLECTOR.humanize(INFLECTOR.underscore(name)) end |
#library_name ⇒ Object
12 13 14 |
# File 'lib/inferno/utils/named_thor_actions.rb', line 12 def library_name INFLECTOR.underscore(name) end |
#module_name ⇒ Object
16 17 18 |
# File 'lib/inferno/utils/named_thor_actions.rb', line 16 def module_name INFLECTOR.camelize(name) end |
#root_name ⇒ Object
8 9 10 |
# File 'lib/inferno/utils/named_thor_actions.rb', line 8 def root_name INFLECTOR.dasherize(INFLECTOR.underscore(name)) end |
#test_kit_id ⇒ Object
28 29 30 |
# File 'lib/inferno/utils/named_thor_actions.rb', line 28 def test_kit_id library_name.delete_suffix('_test_kit') end |
#test_suite_id ⇒ Object
32 33 34 |
# File 'lib/inferno/utils/named_thor_actions.rb', line 32 def test_suite_id test_kit_id end |
#title_name ⇒ Object
24 25 26 |
# File 'lib/inferno/utils/named_thor_actions.rb', line 24 def title_name human_name.split.map(&:capitalize).join(' ') end |