Class: InstantQuote::DecisionParser

Inherits:
Object
  • Object
show all
Defined in:
lib/instant_quote/decision_parser.rb

Overview

This is the class responsible for parsing the decision that is provided by every different provider. You should inherit from this class in every specific parser (for the different providers).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ DecisionParser

Returns a new instance of DecisionParser.



12
13
14
# File 'lib/instant_quote/decision_parser.rb', line 12

def initialize(data = {})
  @data = ActiveSupport::HashWithIndifferentAccess.new(data)
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



10
11
12
# File 'lib/instant_quote/decision_parser.rb', line 10

def data
  @data
end

Instance Method Details

#approved?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/instant_quote/decision_parser.rb', line 20

def approved?
  false
end

#declined?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/instant_quote/decision_parser.rb', line 24

def declined?
  false
end

#loan_started?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/instant_quote/decision_parser.rb', line 36

def loan_started?
  false
end

#manual_review?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/instant_quote/decision_parser.rb', line 28

def manual_review?
  false
end

#no_decision_possible?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/instant_quote/decision_parser.rb', line 32

def no_decision_possible?
  false
end

#pending?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/instant_quote/decision_parser.rb', line 16

def pending?
  false
end

#statusObject

Raises:

  • (NotImplementedError)


40
41
42
# File 'lib/instant_quote/decision_parser.rb', line 40

def status
  raise NotImplementedError, "You must implement '#{self.class}.status'"
end