Class: Exercise::Output
- Inherits:
-
String
- Object
- String
- Exercise::Output
- Defined in:
- lib/commands/exercise/output.rb,
lib/commands/exercise/output/cic.rb,
lib/commands/exercise/output/pytest.rb,
lib/commands/exercise/output/ansible.rb
Defined Under Namespace
Instance Method Summary collapse
-
#initialize(string) ⇒ Output
constructor
A new instance of Output.
- #to_ansible_output ⇒ Object
- #to_cic_output ⇒ Object
- #to_pytest_output ⇒ Object
Constructor Details
#initialize(string) ⇒ Output
Returns a new instance of Output.
6 7 8 9 10 11 |
# File 'lib/commands/exercise/output.rb', line 6 def initialize(string) string = string.scrub bytes = string.bytes.delete_if { |byte| byte == 27 } string = bytes.pack('U*') super normalise(string.chomp) end |