Class: Okayu::ThreadInfo
- Inherits:
-
Object
- Object
- Okayu::ThreadInfo
- Defined in:
- lib/thread_info.rb
Instance Attribute Summary collapse
-
#last_res ⇒ Object
readonly
Returns the value of attribute last_res.
-
#result_code ⇒ Object
readonly
Returns the value of attribute result_code.
-
#revision ⇒ Object
readonly
Returns the value of attribute revision.
-
#server_time ⇒ Object
readonly
Returns the value of attribute server_time.
-
#thread ⇒ Object
readonly
Returns the value of attribute thread.
-
#ticket ⇒ Object
readonly
Returns the value of attribute ticket.
Instance Method Summary collapse
-
#initialize(str) ⇒ ThreadInfo
constructor
A new instance of ThreadInfo.
Constructor Details
#initialize(str) ⇒ ThreadInfo
Returns a new instance of ThreadInfo.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/thread_info.rb', line 4 def initialize(str) if /last_res="(\d+)"/ =~ str @last_res = $1 end if /result_code="(\d+)"/ =~ str @result_code = $1 end if /revision="(\d+)"/ =~ str @revision = $1 end if /server_time="(\d+)"/ =~ str @server_time = $1 end if /thread="(\d+)"/ =~ str @thread = $1 end if /ticket="(0x[a-f0-9]+)"/ =~ str @ticket = $1 end end |
Instance Attribute Details
#last_res ⇒ Object (readonly)
Returns the value of attribute last_res.
3 4 5 |
# File 'lib/thread_info.rb', line 3 def last_res @last_res end |
#result_code ⇒ Object (readonly)
Returns the value of attribute result_code.
3 4 5 |
# File 'lib/thread_info.rb', line 3 def result_code @result_code end |
#revision ⇒ Object (readonly)
Returns the value of attribute revision.
3 4 5 |
# File 'lib/thread_info.rb', line 3 def revision @revision end |
#server_time ⇒ Object (readonly)
Returns the value of attribute server_time.
3 4 5 |
# File 'lib/thread_info.rb', line 3 def server_time @server_time end |
#thread ⇒ Object (readonly)
Returns the value of attribute thread.
3 4 5 |
# File 'lib/thread_info.rb', line 3 def thread @thread end |
#ticket ⇒ Object (readonly)
Returns the value of attribute ticket.
3 4 5 |
# File 'lib/thread_info.rb', line 3 def ticket @ticket end |