Class: TCB::Generators::CommandArgument
- Inherits:
-
Data
- Object
- Data
- TCB::Generators::CommandArgument
- Defined in:
- lib/generators/tcb/shared/command_argument.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #command_class_name ⇒ Object
- #handler_class_name ⇒ Object
- #handler_file_name ⇒ Object
- #handler_file_path(module_name) ⇒ Object
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs
5 6 7 |
# File 'lib/generators/tcb/shared/command_argument.rb', line 5 def attrs @attrs end |
#name ⇒ Object (readonly)
Returns the value of attribute name
5 6 7 |
# File 'lib/generators/tcb/shared/command_argument.rb', line 5 def name @name end |
Instance Method Details
#command_class_name ⇒ Object
6 7 8 |
# File 'lib/generators/tcb/shared/command_argument.rb', line 6 def command_class_name camelize(name) end |
#handler_class_name ⇒ Object
10 11 12 |
# File 'lib/generators/tcb/shared/command_argument.rb', line 10 def handler_class_name "#{camelize(name)}Handler" end |
#handler_file_name ⇒ Object
14 15 16 |
# File 'lib/generators/tcb/shared/command_argument.rb', line 14 def handler_file_name "#{name}_handler" end |
#handler_file_path(module_name) ⇒ Object
18 19 20 |
# File 'lib/generators/tcb/shared/command_argument.rb', line 18 def handler_file_path(module_name) "app/domain/#{module_name}/#{handler_file_name}.rb" end |