Class: JazzFingers::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/jazz_fingers/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#amazing_print=(value) ⇒ Object (writeonly)

Sets the attribute amazing_print

Parameters:

  • value

    the value to set the attribute amazing_print to.



3
4
5
# File 'lib/jazz_fingers/configuration.rb', line 3

def amazing_print=(value)
  @amazing_print = value
end

#application_nameObject



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/jazz_fingers/configuration.rb', line 39

def application_name
  return underscore(@application_name) unless @application_name.nil?

  if defined?(Rails)
    application_class = Rails.application.class

    if application_class.respond_to?(:module_parent_name)
      return application_class.module_parent_name.underscore
    else
      return application_class.parent_name.underscore
    end
  end

  "jazz_fingers"
end

#colored_promptObject

Color the prompt?

A different setting than Pry.color since some may like colored output, but a plain prompt.

Default: true, delegating to Pry.color.



12
13
14
15
16
17
18
# File 'lib/jazz_fingers/configuration.rb', line 12

def colored_prompt
  if @colored_prompt.nil?
    Pry.color
  else
    @colored_prompt
  end
end

#coolline=(value) ⇒ Object (writeonly)

Sets the attribute coolline

Parameters:

  • value

    the value to set the attribute coolline to.



3
4
5
# File 'lib/jazz_fingers/configuration.rb', line 3

def coolline=(value)
  @coolline = value
end

#prompt_separatorObject

Separator between application name and input in the prompt.

Default: right angle quote (»).



23
24
25
# File 'lib/jazz_fingers/configuration.rb', line 23

def prompt_separator
  @prompt_separator ||= "\u00BB"
end

Instance Method Details

#amazing_print?Boolean

Returns:

  • (Boolean)


33
34
35
36
37
# File 'lib/jazz_fingers/configuration.rb', line 33

def amazing_print?
  return true if @amazing_print.nil?

  @amazing_print
end

#coolline?Boolean

Returns:

  • (Boolean)


27
28
29
30
31
# File 'lib/jazz_fingers/configuration.rb', line 27

def coolline?
  return false if @coolline.nil?

  @coolline
end