Module: Icepick
- Defined in:
- lib/icepick.rb,
lib/icepick/config.rb,
lib/icepick/prompt.rb,
lib/icepick/version.rb
Defined Under Namespace
Constant Summary collapse
- AWESOME_OPTS =
AwesomePrint configuration options
{ indent: 2, sort_keys: true }
- VERSION =
'1.3.0'
Class Method Summary collapse
-
.initialize!(name = nil) ⇒ Object
Public: Setup and initialize Icepick.
Instance Method Summary collapse
-
#initialize ⇒ Object
Public: Prohibit the instantiation of Icepick.
Class Method Details
.initialize!(name = nil) ⇒ Object
Public: Setup and initialize Icepick
options - Options to use in setup (defaults: {})
* name: A name to use for the prompt
Returns nothing
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/icepick.rb', line 33 def self.initialize!(name = nil) silence_warnings do # Use awesome_print for Pry output Pry.config.print = ->(output, value) do pretty = value.ai(AWESOME_OPTS) Pry::Helpers::BaseHelpers.stagger_output("=> #{pretty}", output) end # Use Icepick's Prompt for Pry Pry.config.prompt = Prompt.pry_prompts # Debug aliases Pry.commands.alias_command 'c', 'continue' Pry.commands.alias_command 's', 'step' Pry.commands.alias_command 'n', 'next' Pry.commands.alias_command 'f', 'finish' Pry.commands.alias_command 'e', 'exit' Pry.commands.alias_command 'q', 'quit' Pry.commands.alias_command '..', 'cd' end end |
Instance Method Details
#initialize ⇒ Object
Public: Prohibit the instantiation of Icepick
Raises NotImplementedError
23 24 25 |
# File 'lib/icepick.rb', line 23 def initialize raise NotImplementedError end |