Class: Rails::Generators::ContextGenerator

Inherits:
NamedBase
  • Object
show all
Defined in:
lib/generators/context/context_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_context_fileObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/generators/context/context_generator.rb', line 14

def create_context_file
  template(
    'context.rb',
    File.join(
      'app/contexts',
      class_path,
      "#{file_name}_context.rb"
    )
  )
end