Class: Linux::Utmpx::UtmpxParser
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- Linux::Utmpx::UtmpxParser
- Defined in:
- lib/linux/utmpx/parser.rb
Constant Summary collapse
- UT_LINESIZE =
32
- UT_NAMESIZE =
32
- UT_HOSTSIZE =
256
- UT_IDSIZE =
4
Instance Method Summary collapse
- #host ⇒ Object
- #id ⇒ Object
- #line ⇒ Object
- #pid ⇒ Object
- #time ⇒ Object
- #type ⇒ Object
- #user ⇒ Object
Instance Method Details
#host ⇒ Object
67 68 69 |
# File 'lib/linux/utmpx/parser.rb', line 67 def host ut_host end |
#id ⇒ Object
63 64 65 |
# File 'lib/linux/utmpx/parser.rb', line 63 def id ut_id end |
#line ⇒ Object
55 56 57 |
# File 'lib/linux/utmpx/parser.rb', line 55 def line ut_line end |
#pid ⇒ Object
51 52 53 |
# File 'lib/linux/utmpx/parser.rb', line 51 def pid ut_pid end |
#time ⇒ Object
40 41 42 |
# File 'lib/linux/utmpx/parser.rb', line 40 def time Time.at(ut_tv.tv_sec, ut_tv.tv_usec) end |
#type ⇒ Object
44 45 46 47 48 49 |
# File 'lib/linux/utmpx/parser.rb', line 44 def type Linux::Utmpx::Type.constants.each do |sym| return sym if Linux::Utmpx::Type.const_get(sym) == ut_type end ut_type end |
#user ⇒ Object
59 60 61 |
# File 'lib/linux/utmpx/parser.rb', line 59 def user ut_user end |