Class: Istat::Frames::AuthenticationResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/istat/frames/authentication.rb

Constant Summary collapse

READY =
"ready".freeze
REJECT =
"athrej".freeze

Constants inherited from Base

Base::DOCTYPE

Instance Method Summary collapse

Methods inherited from Base

#initialize, #to_s

Constructor Details

This class inherits a constructor from Istat::Frames::Base

Instance Method Details

#ready?Boolean

check if he authentication was successful

Returns:

  • (Boolean)

    true if authentication is successful



43
44
45
46
47
48
49
# File 'lib/istat/frames/authentication.rb', line 43

def ready?
  if val = @root.attributes[READY]
    val.to_i == 1
  else
    false
  end
end

#rejected?Boolean

check if he authentication was rejected

Returns:

  • (Boolean)

    true if authentication is rejected



53
54
55
56
57
58
59
# File 'lib/istat/frames/authentication.rb', line 53

def rejected?
  if val = @root.attributes[REJECT]
    val.to_i == 1
  else
    false
  end
end