Class: Hanami::CLI::Naming
- Inherits:
-
Object
- Object
- Hanami::CLI::Naming
- Defined in:
- lib/hanami/cli/naming.rb
Overview
Instance Method Summary collapse
- #action_name(name) ⇒ Object
-
#initialize(inflector:) ⇒ Naming
constructor
A new instance of Naming.
Constructor Details
#initialize(inflector:) ⇒ Naming
Returns a new instance of Naming.
8 9 10 |
# File 'lib/hanami/cli/naming.rb', line 8 def initialize(inflector:) @inflector = inflector end |
Instance Method Details
#action_name(name) ⇒ Object
12 13 14 |
# File 'lib/hanami/cli/naming.rb', line 12 def action_name(name) inflector.underscore(escape(name)).gsub("/", ".") end |