Module: Hanami::CLIBulma::Commands::App Private

Defined in:
lib/hanami/cli_bulma/commands/app.rb,
lib/hanami/cli_bulma/commands/app/command.rb,
lib/hanami/cli_bulma/commands/app/generate.rb,
lib/hanami/cli_bulma/commands/app/generate/view.rb,
lib/hanami/cli_bulma/commands/app/generate/slice.rb,
lib/hanami/cli_bulma/commands/app/generate/action.rb

Overview

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

Commands made available when the hanami CLI is executed within an Hanami app.

Since:

  • 0.0.1

Defined Under Namespace

Modules: Generate Classes: Command

Class Method Summary collapse

Class Method Details

.extended(base) ⇒ 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:

  • 0.0.1



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/hanami/cli_bulma/commands/app.rb', line 13

def self.extended(base)
  base.module_eval do
    register "generate", aliases: ["g"] do |prefix|
      prefix.register "slice", Generate::Slice
      if Hanami.bundled?("hanami-controller")
        prefix.register "action", Generate::Action
      end

      if Hanami.bundled?("hanami-view")
        prefix.register "view", Generate::View
      end
    end
  end
end