Class: Codeball::ExtractionResult
- Inherits:
-
Struct
- Object
- Struct
- Codeball::ExtractionResult
- Defined in:
- lib/codeball/extraction_result.rb
Overview
Represents the outcome of extracting a single entry from a codeball.
## Example
“‘ruby
puts "Wrote #{result.path}"
puts "Failed: #{result.error}"
“‘
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#line_count ⇒ Object
Returns the value of attribute line_count.
-
#path ⇒ Object
Returns the value of attribute path.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#success? ⇒ Boolean
Whether the extraction completed successfully.
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error
11 12 13 |
# File 'lib/codeball/extraction_result.rb', line 11 def error @error end |
#line_count ⇒ Object
Returns the value of attribute line_count
11 12 13 |
# File 'lib/codeball/extraction_result.rb', line 11 def line_count @line_count end |
#path ⇒ Object
Returns the value of attribute path
11 12 13 |
# File 'lib/codeball/extraction_result.rb', line 11 def path @path end |
#status ⇒ Object
Returns the value of attribute status
11 12 13 |
# File 'lib/codeball/extraction_result.rb', line 11 def status @status end |
Instance Method Details
#success? ⇒ Boolean
Whether the extraction completed successfully. Both actual writes and dry-run simulations count as success.
14 |
# File 'lib/codeball/extraction_result.rb', line 14 def success? = %i[written dry_run].include?(status) |