Class: Thread::Backtrace::Location
Instance Attribute Summary collapse
- 
  
    
      #base_label  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute base_label. 
- 
  
    
      #label  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute label. 
- 
  
    
      #lineno  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute lineno. 
- 
  
    
      #path  ⇒ Object 
    
    
      (also: #absolute_path)
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute path. 
Instance Method Summary collapse
- 
  
    
      #initialize(str)  ⇒ Location 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Location. 
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(str) ⇒ Location
Returns a new instance of Location.
| 115 116 117 118 119 120 121 122 123 124 125 | # File 'opal/stdlib/thread.rb', line 115 def initialize(str) @str = str str =~ /^(.*?):(\d+):(\d+):in `(.*?)'$/ @path = Regexp.last_match(1) @label = Regexp.last_match(4) @lineno = Regexp.last_match(2).to_i @label =~ /(\w+)$/ @base_label = Regexp.last_match(1) || @label end | 
Instance Attribute Details
#base_label ⇒ Object (readonly)
Returns the value of attribute base_label.
| 135 136 137 | # File 'opal/stdlib/thread.rb', line 135 def base_label @base_label end | 
#label ⇒ Object (readonly)
Returns the value of attribute label.
| 135 136 137 | # File 'opal/stdlib/thread.rb', line 135 def label @label end | 
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
| 135 136 137 | # File 'opal/stdlib/thread.rb', line 135 def lineno @lineno end | 
#path ⇒ Object (readonly) Also known as: absolute_path
Returns the value of attribute path.
| 135 136 137 | # File 'opal/stdlib/thread.rb', line 135 def path @path end |