Class: Vocab::UI
- Inherits:
-
Object
- Object
- Vocab::UI
- Defined in:
- lib/vocab/ui.rb
Instance Attribute Summary collapse
-
#silent ⇒ Object
Returns the value of attribute silent.
Instance Method Summary collapse
-
#initialize ⇒ UI
constructor
A new instance of UI.
- #say(message) ⇒ Object
- #warn(message) ⇒ Object
Constructor Details
#initialize ⇒ UI
Returns a new instance of UI.
6 7 8 |
# File 'lib/vocab/ui.rb', line 6 def initialize() @silent = false end |
Instance Attribute Details
#silent ⇒ Object
Returns the value of attribute silent.
4 5 6 |
# File 'lib/vocab/ui.rb', line 4 def silent @silent end |
Instance Method Details
#say(message) ⇒ Object
10 11 12 |
# File 'lib/vocab/ui.rb', line 10 def say( ) puts unless silent end |
#warn(message) ⇒ Object
14 15 16 |
# File 'lib/vocab/ui.rb', line 14 def warn( ) say( "Warning: #{}" ) end |