Class: Tracia::Frame
- Inherits:
-
Object
- Object
- Tracia::Frame
- Includes:
- TreeGraph, TreeHtml
- Defined in:
- lib/tracia/frame.rb
Instance Attribute Summary collapse
-
#call_sym ⇒ Object
readonly
Returns the value of attribute call_sym.
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#lineno ⇒ Object
readonly
Returns the value of attribute lineno.
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
Instance Method Summary collapse
- #children_for_tree_graph ⇒ Object
- #children_for_tree_html ⇒ Object
- #css_for_tree_html ⇒ Object
-
#initialize(klass, call_sym, method_name, file, lineno) ⇒ Frame
constructor
A new instance of Frame.
- #label_for_tree_graph ⇒ Object
- #label_for_tree_html ⇒ Object
- #same_klass_and_method?(other_frame) ⇒ Boolean
Constructor Details
#initialize(klass, call_sym, method_name, file, lineno) ⇒ Frame
Returns a new instance of Frame.
12 13 14 15 16 17 18 19 |
# File 'lib/tracia/frame.rb', line 12 def initialize(klass, call_sym, method_name, file, lineno) @klass = klass @call_sym = call_sym @method_name = method_name @file = file @lineno = lineno @children = [] end |
Instance Attribute Details
#call_sym ⇒ Object (readonly)
Returns the value of attribute call_sym.
10 11 12 |
# File 'lib/tracia/frame.rb', line 10 def call_sym @call_sym end |
#children ⇒ Object (readonly)
Returns the value of attribute children.
10 11 12 |
# File 'lib/tracia/frame.rb', line 10 def children @children end |
#file ⇒ Object (readonly)
Returns the value of attribute file.
10 11 12 |
# File 'lib/tracia/frame.rb', line 10 def file @file end |
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
10 11 12 |
# File 'lib/tracia/frame.rb', line 10 def klass @klass end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
10 11 12 |
# File 'lib/tracia/frame.rb', line 10 def lineno @lineno end |
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
10 11 12 |
# File 'lib/tracia/frame.rb', line 10 def method_name @method_name end |
Instance Method Details
#children_for_tree_graph ⇒ Object
31 32 33 |
# File 'lib/tracia/frame.rb', line 31 def children_for_tree_graph children end |
#children_for_tree_html ⇒ Object
39 40 41 |
# File 'lib/tracia/frame.rb', line 39 def children_for_tree_html children end |
#css_for_tree_html ⇒ Object
43 44 45 |
# File 'lib/tracia/frame.rb', line 43 def css_for_tree_html '.hl{color: #a50000;}' end |
#label_for_tree_graph ⇒ Object
27 28 29 |
# File 'lib/tracia/frame.rb', line 27 def label_for_tree_graph "#{class_and_method} #{source_location}" end |
#label_for_tree_html ⇒ Object
35 36 37 |
# File 'lib/tracia/frame.rb', line 35 def label_for_tree_html "<span class='hl'>#{CGI::escapeHTML(class_and_method)}</span> #{CGI::escapeHTML(source_location)}" end |
#same_klass_and_method?(other_frame) ⇒ Boolean
21 22 23 24 25 |
# File 'lib/tracia/frame.rb', line 21 def same_klass_and_method?(other_frame) klass == other_frame.klass && call_sym == other_frame.call_sym && method_name == other_frame.method_name end |