Exception: K2ValidateErrors

Inherits:
K2Errors
  • Object
show all
Defined in:
lib/k2-connect-ruby/k2_errors.rb

Overview

Errors concerning the Validation module

Direct Known Subclasses

K2EmptyParams, K2IncorrectParams

Instance Attribute Summary collapse

Attributes inherited from K2Errors

#status

Instance Method Summary collapse

Constructor Details

#initialize(the_keys) ⇒ K2ValidateErrors

Returns a new instance of K2ValidateErrors.



47
48
49
50
51
# File 'lib/k2-connect-ruby/k2_errors.rb', line 47

def initialize(the_keys)
  super
  @the_keys = the_keys
  @status = :bad_request
end

Instance Attribute Details

#the_keysObject (readonly)

Returns the value of attribute the_keys.



45
46
47
# File 'lib/k2-connect-ruby/k2_errors.rb', line 45

def the_keys
  @the_keys
end

Instance Method Details

#loop_keysObject



53
54
55
56
# File 'lib/k2-connect-ruby/k2_errors.rb', line 53

def loop_keys
  STDERR.puts @message
  @the_keys.each(&method(:puts))
end

#messageObject



58
59
60
# File 'lib/k2-connect-ruby/k2_errors.rb', line 58

def message
  loop_keys
end