Exception: Approvals::ApprovalError

Inherits:
Exception
  • Object
show all
Defined in:
lib/approvals/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#approved_pathObject

Returns the value of attribute approved_path


3
4
5
# File 'lib/approvals/error.rb', line 3

def approved_path
  @approved_path
end

#received_pathObject

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_textObject


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_textObject


9
10
11
# File 'lib/approvals/error.rb', line 9

def received_text
  received_exists? && IO.read(received_path)
end