Class: Tapout::Config
- Inherits:
-
Object
- Object
- Tapout::Config
- Defined in:
- lib/tapout/config.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
ANSI err.
-
#fail ⇒ Object
ANSI fail.
-
#highlight ⇒ Object
ANSI highlight.
-
#lines ⇒ Object
Returns the value of attribute lines.
-
#omit ⇒ Object
ANSI omit.
-
#pass ⇒ Object
ANSI pass.
-
#todo ⇒ Object
ANSI todo.
-
#trace ⇒ Object
Returns the value of attribute trace.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #initialize_defaults ⇒ Object
- #minimal=(boolean) ⇒ Object
- #minimal? ⇒ Boolean
- #update(settings, &block) ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
15 16 17 |
# File 'lib/tapout/config.rb', line 15 def initialize initialize_defaults end |
Instance Attribute Details
#error ⇒ Object
ANSI err
92 93 94 |
# File 'lib/tapout/config.rb', line 92 def error @error end |
#fail ⇒ Object
ANSI fail
85 86 87 |
# File 'lib/tapout/config.rb', line 85 def fail @fail end |
#highlight ⇒ Object
ANSI highlight
71 72 73 |
# File 'lib/tapout/config.rb', line 71 def highlight @highlight end |
#lines ⇒ Object
Returns the value of attribute lines.
53 54 55 |
# File 'lib/tapout/config.rb', line 53 def lines @lines end |
#omit ⇒ Object
ANSI omit
106 107 108 |
# File 'lib/tapout/config.rb', line 106 def omit @omit end |
#pass ⇒ Object
ANSI pass
78 79 80 |
# File 'lib/tapout/config.rb', line 78 def pass @pass end |
#todo ⇒ Object
ANSI todo
99 100 101 |
# File 'lib/tapout/config.rb', line 99 def todo @todo end |
#trace ⇒ Object
Returns the value of attribute trace.
45 46 47 |
# File 'lib/tapout/config.rb', line 45 def trace @trace end |
Instance Method Details
#initialize_defaults ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/tapout/config.rb', line 20 def initialize_defaults @trace = nil @lines = 3 @minimal = false @highlight = [:bold] @fadelight = [:dark] @pass = [:green] @fail = [:red] @error = [:red] @todo = [:yellow] @omit = [:yellow] end |
#minimal=(boolean) ⇒ Object
66 67 68 |
# File 'lib/tapout/config.rb', line 66 def minimal=(boolean) @minimal = boolean ? true : false end |
#minimal? ⇒ Boolean
61 62 63 |
# File 'lib/tapout/config.rb', line 61 def minimal? @minimal end |
#update(settings, &block) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/tapout/config.rb', line 36 def update(settings, &block) settings.each do |k,v| __send__("#{k}=", v) end if settings block.call(self) if block self end |