Class: VodemSms::StatusChecker::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/vodem_sms/status_checker.rb

Constant Summary collapse

CONNECTED =
"ppp_connected"
DISCONNECTED =
"ppp_disconnected"
CONNECTING =
"ppp_connecting"

Instance Method Summary collapse

Constructor Details

#initialize(status) ⇒ Status

Returns a new instance of Status.



12
13
14
# File 'lib/vodem_sms/status_checker.rb', line 12

def initialize(status)
  @status = status
end

Instance Method Details

#connected?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/vodem_sms/status_checker.rb', line 16

def connected?
  status == CONNECTED
end

#connecting?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/vodem_sms/status_checker.rb', line 24

def connecting?
  status == CONNECTING
end

#disconnected?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/vodem_sms/status_checker.rb', line 20

def disconnected?
  status == DISCONNECTED
end