Module: JazzFingers
- Extended by:
- Forwardable
- Defined in:
- lib/jazz_fingers.rb,
lib/jazz_fingers/input.rb,
lib/jazz_fingers/print.rb,
lib/jazz_fingers/prompt.rb,
lib/jazz_fingers/version.rb,
lib/jazz_fingers/configuration.rb
Defined Under Namespace
Classes: Configuration, Input, Print, Prompt
Constant Summary
collapse
- VERSION =
'5.0.0'.freeze
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
43
44
45
|
# File 'lib/jazz_fingers.rb', line 43
def config
@config ||= Configuration.new
end
|
38
39
40
41
|
# File 'lib/jazz_fingers.rb', line 38
def configure
yield @config ||= Configuration.new
setup!
end
|
34
35
36
|
# File 'lib/jazz_fingers.rb', line 34
def input
@input ||= Input.config
end
|
.print ⇒ Object
20
21
22
|
# File 'lib/jazz_fingers.rb', line 20
def print
@print ||= Print.config
end
|
.prompt ⇒ Object
24
25
26
27
28
29
30
31
32
|
# File 'lib/jazz_fingers.rb', line 24
def prompt
@prompt ||=
Prompt.new(
colored: config.colored_prompt,
separator: config.prompt_separator,
application_name: config.application_name
)
@prompt.config
end
|
.setup! ⇒ Object
47
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/jazz_fingers.rb', line 47
def setup!
Pry.print = print if JazzFingers.awesome_print?
Pry.prompt = prompt
Pry.input = input if JazzFingers.coolline?
Pry.config.should_load_plugins = false
Pry.commands.alias_command('c', 'continue')
Pry.commands.alias_command('s', 'step')
Pry.commands.alias_command('n', 'next')
true
end
|