Class: Hanami::RSpec::Commands::Generate::Part Private

Inherits:
CLI::Commands::App::Command
  • Object
show all
Defined in:
lib/hanami/rspec/commands.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 2.0.0

API:

  • private

Instance Method Summary collapse

Instance Method Details

#call(name: nil, slice: nil, skip_tests: false) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 2.0.0

API:

  • private



142
143
144
145
146
147
148
149
150
# File 'lib/hanami/rspec/commands.rb', line 142

def call(name: nil, slice: nil, skip_tests: false, **)
  return if skip_tests

  slice = inflector.underscore(Shellwords.shellescape(slice)) if slice
  name = inflector.underscore(Shellwords.shellescape(name))

  generator = Generators::Part.new(fs: fs, inflector: inflector)
  generator.call(app.namespace, slice, name)
end