Class: Okayu::ThreadInfo

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_resObject (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_codeObject (readonly)

Returns the value of attribute result_code.



3
4
5
# File 'lib/thread_info.rb', line 3

def result_code
  @result_code
end

#revisionObject (readonly)

Returns the value of attribute revision.



3
4
5
# File 'lib/thread_info.rb', line 3

def revision
  @revision
end

#server_timeObject (readonly)

Returns the value of attribute server_time.



3
4
5
# File 'lib/thread_info.rb', line 3

def server_time
  @server_time
end

#threadObject (readonly)

Returns the value of attribute thread.



3
4
5
# File 'lib/thread_info.rb', line 3

def thread
  @thread
end

#ticketObject (readonly)

Returns the value of attribute ticket.



3
4
5
# File 'lib/thread_info.rb', line 3

def ticket
  @ticket
end