Class: Ruined::Context
- Inherits:
-
Object
- Object
- Ruined::Context
- Defined in:
- lib/ruined/ruinmain.rb
Constant Summary collapse
- TLSES =
['$!', '$?', '$@', '$SAFE']
Instance Attribute Summary collapse
-
#binding ⇒ Object
readonly
Returns the value of attribute binding.
-
#break ⇒ Object
readonly
Returns the value of attribute break.
-
#event ⇒ Object
Returns the value of attribute event.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#iid ⇒ Object
readonly
Returns the value of attribute iid.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
-
#tlses ⇒ Object
readonly
Returns the value of attribute tlses.
Instance Method Summary collapse
-
#initialize(e, f, l, id, bnd, b, s) ⇒ Context
constructor
A new instance of Context.
- #to_hash ⇒ Object
Constructor Details
#initialize(e, f, l, id, bnd, b, s) ⇒ Context
Returns a new instance of Context.
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/ruined/ruinmain.rb', line 40 def initialize(e, f, l, id, bnd, b, s) @event = e @file = f @line = l @iid = id.to_s @break = b @binding = bnd @stdout = s @tlses = Hash[*(TLSES.map{|k| [k, eval(k)]}.flatten(1))] end |
Instance Attribute Details
#binding ⇒ Object (readonly)
Returns the value of attribute binding.
54 55 56 |
# File 'lib/ruined/ruinmain.rb', line 54 def binding @binding end |
#break ⇒ Object (readonly)
Returns the value of attribute break.
54 55 56 |
# File 'lib/ruined/ruinmain.rb', line 54 def break @break end |
#event ⇒ Object
Returns the value of attribute event.
55 56 57 |
# File 'lib/ruined/ruinmain.rb', line 55 def event @event end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
54 55 56 |
# File 'lib/ruined/ruinmain.rb', line 54 def file @file end |
#iid ⇒ Object (readonly)
Returns the value of attribute iid.
54 55 56 |
# File 'lib/ruined/ruinmain.rb', line 54 def iid @iid end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
54 55 56 |
# File 'lib/ruined/ruinmain.rb', line 54 def line @line end |
#stdout ⇒ Object
Returns the value of attribute stdout.
55 56 57 |
# File 'lib/ruined/ruinmain.rb', line 55 def stdout @stdout end |
#tlses ⇒ Object (readonly)
Returns the value of attribute tlses.
54 55 56 |
# File 'lib/ruined/ruinmain.rb', line 54 def tlses @tlses end |
Instance Method Details
#to_hash ⇒ Object
50 51 52 53 |
# File 'lib/ruined/ruinmain.rb', line 50 def to_hash { :event => @event, :file => @file, :line => @line, :id => @iid, :break => @break, :stdout => @stdout, :threads => Ruined.user_threads(self) } end |