Class: MusicalSpec::Formatter
- Inherits:
-
RSpec::Core::Formatters::ProgressFormatter
- Object
- RSpec::Core::Formatters::ProgressFormatter
- MusicalSpec::Formatter
- Defined in:
- lib/musical_spec/formatter.rb
Instance Attribute Summary collapse
-
#player ⇒ Object
readonly
Returns the value of attribute player.
Instance Method Summary collapse
-
#example_failed(example) ⇒ Object
Plays a lower note and then calls super.
-
#example_passed(example) ⇒ Object
Plays a higher note and then calls super.
-
#example_pending(example) ⇒ Object
Plays a note without changing the pitch and then calls super.
-
#initialize(output) ⇒ Formatter
constructor
A new instance of Formatter.
Constructor Details
Instance Attribute Details
#player ⇒ Object (readonly)
Returns the value of attribute player.
13 14 15 |
# File 'lib/musical_spec/formatter.rb', line 13 def player @player end |
Instance Method Details
#example_failed(example) ⇒ Object
Plays a lower note and then calls super.
22 23 24 25 |
# File 'lib/musical_spec/formatter.rb', line 22 def example_failed(example) play_lower_note super(example) end |
#example_passed(example) ⇒ Object
Plays a higher note and then calls super.
16 17 18 19 |
# File 'lib/musical_spec/formatter.rb', line 16 def example_passed(example) play_higher_note super(example) end |
#example_pending(example) ⇒ Object
Plays a note without changing the pitch and then calls super.
28 29 30 31 |
# File 'lib/musical_spec/formatter.rb', line 28 def example_pending(example) play_note super(example) end |