Class: TCB::Generators::CommandArgument

Inherits:
Data
  • Object
show all
Defined in:
lib/generators/tcb/shared/command_argument.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attrsObject (readonly)

Returns the value of attribute attrs

Returns:

  • (Object)

    the current value of attrs



5
6
7
# File 'lib/generators/tcb/shared/command_argument.rb', line 5

def attrs
  @attrs
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



5
6
7
# File 'lib/generators/tcb/shared/command_argument.rb', line 5

def name
  @name
end

Instance Method Details

#command_class_nameObject



6
7
8
# File 'lib/generators/tcb/shared/command_argument.rb', line 6

def command_class_name
  camelize(name)
end

#handler_class_nameObject



10
11
12
# File 'lib/generators/tcb/shared/command_argument.rb', line 10

def handler_class_name
  "#{camelize(name)}Handler"
end

#handler_file_nameObject



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