Exception: Approvals::ApprovalError
- Inherits:
-
Exception
- Object
- Exception
- Approvals::ApprovalError
- Defined in:
- lib/approvals/error.rb
Instance Attribute Summary collapse
-
#approved_path ⇒ Object
Returns the value of attribute approved_path.
-
#received_path ⇒ Object
Returns the value of attribute received_path.
Instance Method Summary collapse
- #approved_exists? ⇒ Boolean
- #approved_text ⇒ Object
- #received_exists? ⇒ Boolean
- #received_text ⇒ Object
Instance Attribute Details
#approved_path ⇒ Object
Returns the value of attribute approved_path.
3 4 5 |
# File 'lib/approvals/error.rb', line 3 def approved_path @approved_path end |
#received_path ⇒ Object
Returns the value of attribute received_path.
3 4 5 |
# File 'lib/approvals/error.rb', line 3 def received_path @received_path end |
Instance Method Details
#approved_exists? ⇒ Boolean
13 14 15 |
# File 'lib/approvals/error.rb', line 13 def approved_exists? approved_path && File.exist?(approved_path) end |
#approved_text ⇒ Object
17 18 19 |
# File 'lib/approvals/error.rb', line 17 def approved_text approved_exists? && IO.read(approved_path) end |
#received_exists? ⇒ Boolean
5 6 7 |
# File 'lib/approvals/error.rb', line 5 def received_exists? received_path && File.exist?(received_path) end |
#received_text ⇒ Object
9 10 11 |
# File 'lib/approvals/error.rb', line 9 def received_text received_exists? && IO.read(received_path) end |