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

Instance Method Details

#human_nameObject



20
21
22
# File 'lib/inferno/utils/named_thor_actions.rb', line 20

def human_name
  INFLECTOR.humanize(INFLECTOR.underscore(name))
end

#library_nameObject



12
13
14
# File 'lib/inferno/utils/named_thor_actions.rb', line 12

def library_name
  INFLECTOR.underscore(name)
end

#module_nameObject



16
17
18
# File 'lib/inferno/utils/named_thor_actions.rb', line 16

def module_name
  INFLECTOR.camelize(name)
end

#root_nameObject



8
9
10
# File 'lib/inferno/utils/named_thor_actions.rb', line 8

def root_name
  INFLECTOR.dasherize(INFLECTOR.underscore(name))
end

#test_suite_idObject



28
29
30
# File 'lib/inferno/utils/named_thor_actions.rb', line 28

def test_suite_id
  "#{library_name}_test_suite"
end

#title_nameObject



24
25
26
# File 'lib/inferno/utils/named_thor_actions.rb', line 24

def title_name
  human_name.split.map(&:capitalize).join(' ')
end