Module: Hippo::Command

Defined in:
lib/hippo/command.rb,
lib/hippo/command/db.rb,
lib/hippo/command/app.rb,
lib/hippo/command/jest.rb,
lib/hippo/command/puma.rb,
lib/hippo/command/guard.rb,
lib/hippo/command/server.rb,
lib/hippo/command/update.rb,
lib/hippo/command/console.rb,
lib/hippo/command/webpack.rb,
lib/hippo/command/generate.rb,
lib/hippo/command/update_model.rb,
lib/hippo/command/named_command.rb,
lib/hippo/command/generate_model.rb,
lib/hippo/command/generate_screen.rb,
lib/hippo/command/model_attribute.rb,
lib/hippo/command/migration_support.rb,
lib/hippo/command/generate_migration.rb,
lib/hippo/command/client_model_update.rb

Defined Under Namespace

Modules: ClientModelUpdate, MigrationSupport Classes: App, Console, Db, Generate, GenerateMigration, GenerateModel, GenerateScreen, Guard, Jest, ModelAttribute, NamedCommand, Puma, Server, Update, UpdateModel, Webpack

Class Method Summary collapse

Class Method Details

.load_current_extension(raise_on_fail: false) ⇒ Object



14
15
16
# File 'lib/hippo/command.rb', line 14

def load_current_extension(raise_on_fail:false)
    Hippo::Extensions.bootstrap(raise_on_fail: raise_on_fail)
end

.usage_from_file(file) ⇒ Object

Reads and returns the contents of a usage file. Used internally by commands to populate their long_desc

Parameters:

  • basename (String)

    of file to read usage from



10
11
12
# File 'lib/hippo/command.rb', line 10

def usage_from_file(file)
    Pathname.new(__FILE__).dirname.join("command","#{file}.usage").read.gsub(/\n/,"\n\x5")
end