Class: Istat::Frames::RegisterResponse
- Defined in:
- lib/istat/frames/register.rb
Constant Summary collapse
- MACOSX =
1
- OTHER_UNIX =
2
Constants inherited from Base
Instance Method Summary collapse
-
#authorize? ⇒ Boolean
check if the user has to authorize using password.
-
#last_uptime ⇒ Integer
calculate the uptime value.
-
#macosx? ⇒ Boolean
True if the remote system is a mac os x.
-
#other_unix? ⇒ Boolean
True if the remote system is a unix (linux, freebsd, solaris).
-
#platform ⇒ Object
parse the platform of the remote system.
-
#ss ⇒ Object
Static value 6.
-
#uptime ⇒ Integer
calculate the current uptime value.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Istat::Frames::Base
Instance Method Details
#authorize? ⇒ Boolean
check if the user has to authorize using password
37 38 39 |
# File 'lib/istat/frames/register.rb', line 37 def @root.attributes["ath"].to_i == 1 end |
#last_uptime ⇒ Integer
calculate the uptime value
43 44 45 |
# File 'lib/istat/frames/register.rb', line 43 def last_uptime @root.attributes["n"].to_i end |
#macosx? ⇒ Boolean
Returns true if the remote system is a mac os x.
70 71 72 |
# File 'lib/istat/frames/register.rb', line 70 def macosx? platform == MACOSX end |
#other_unix? ⇒ Boolean
Returns true if the remote system is a unix (linux, freebsd, solaris).
65 66 67 |
# File 'lib/istat/frames/register.rb', line 65 def other_unix? platform == OTHER_UNIX end |
#platform ⇒ Object
parse the platform of the remote system
60 61 62 |
# File 'lib/istat/frames/register.rb', line 60 def platform @root.attributes["pl"].to_i end |
#ss ⇒ Object
Returns static value 6.
54 55 56 |
# File 'lib/istat/frames/register.rb', line 54 def ss @root.attributes["ss"].to_i end |
#uptime ⇒ Integer
calculate the current uptime value
49 50 51 |
# File 'lib/istat/frames/register.rb', line 49 def uptime @root.attributes["c"].to_i end |