Exception: LMC::OutdatedTermsOfUseException

Inherits:
Exception
  • Object
show all
Defined in:
lib/lmc/exceptions/lmc_outdated_terms_of_use_exception.rb

Instance Method Summary collapse

Constructor Details

#initialize(response = {}) ⇒ OutdatedTermsOfUseException

Returns a new instance of OutdatedTermsOfUseException.



5
6
7
# File 'lib/lmc/exceptions/lmc_outdated_terms_of_use_exception.rb', line 5

def initialize(response = {})
  @response = response
end

Instance Method Details

#missingObject



18
19
20
# File 'lib/lmc/exceptions/lmc_outdated_terms_of_use_exception.rb', line 18

def missing
  @response['details']['missing']
end

#responseObject



9
10
11
12
13
14
15
16
# File 'lib/lmc/exceptions/lmc_outdated_terms_of_use_exception.rb', line 9

def response
  r = "Terms of use must be accepted before using this LMC instance:\n"
  missing.each do |tos|
    r += "Name: #{tos['name']}, Date #{tos['acceptance']}\n"

  end
  r
end