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.
41 42 43 44 45 46 47 48 49 50 |
# File 'lib/ruined/ruinmain.rb', line 41 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.
55 56 57 |
# File 'lib/ruined/ruinmain.rb', line 55 def binding @binding end |
#break ⇒ Object (readonly)
Returns the value of attribute break.
55 56 57 |
# File 'lib/ruined/ruinmain.rb', line 55 def break @break end |
#event ⇒ Object
Returns the value of attribute event.
56 57 58 |
# File 'lib/ruined/ruinmain.rb', line 56 def event @event end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
55 56 57 |
# File 'lib/ruined/ruinmain.rb', line 55 def file @file end |
#iid ⇒ Object (readonly)
Returns the value of attribute iid.
55 56 57 |
# File 'lib/ruined/ruinmain.rb', line 55 def iid @iid end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
55 56 57 |
# File 'lib/ruined/ruinmain.rb', line 55 def line @line end |
#stdout ⇒ Object
Returns the value of attribute stdout.
56 57 58 |
# File 'lib/ruined/ruinmain.rb', line 56 def stdout @stdout end |
#tlses ⇒ Object (readonly)
Returns the value of attribute tlses.
55 56 57 |
# File 'lib/ruined/ruinmain.rb', line 55 def tlses @tlses end |
Instance Method Details
#to_hash ⇒ Object
51 52 53 54 |
# File 'lib/ruined/ruinmain.rb', line 51 def to_hash { :event => @event, :file => @file, :line => @line, :id => @iid, :break => @break, :stdout => @stdout, :threads => Ruined.user_threads(self) } end |