Class: Hanami::CLI::Repl::Pry Private

Inherits:
Core
  • Object
show all
Defined in:
lib/hanami/cli/repl/pry.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

Defined Under Namespace

Classes: Context

Instance Attribute Summary

Attributes inherited from Core

#app, #opts

Instance Method Summary collapse

Methods inherited from Core

#context, #env, #inflector, #initialize, #name, #prompt

Constructor Details

This class inherits a constructor from Hanami::CLI::Repl::Core

Instance Method Details

#startObject

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



15
16
17
18
19
20
21
22
23
# File 'lib/hanami/cli/repl/pry.rb', line 15

def start
  ::Pry.config.prompt = ::Pry::Prompt.new(
    "hanami",
    "my custom prompt",
    [proc { |*| "#{prompt}> " }]
  )

  ::Pry.start(Context.new.extend(context))
end