Class: Nydp::Fn
Instance Attribute Summary collapse
-
#src ⇒ Object
Returns the value of attribute src.
Instance Method Summary collapse
- #container_class_name ⇒ Object
-
#initialize(&b) ⇒ Fn
constructor
A new instance of Fn.
- #inspect ⇒ Object
- #is_named(name) ⇒ Object
- #nydp_type ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(&b) ⇒ Fn
Returns a new instance of Fn.
8 9 10 |
# File 'lib/nydp/interpreted_function.rb', line 8 def initialize &b super &b end |
Instance Attribute Details
#src ⇒ Object
Returns the value of attribute src.
7 8 9 |
# File 'lib/nydp/interpreted_function.rb', line 7 def src @src end |
Instance Method Details
#container_class_name ⇒ Object
14 15 16 17 |
# File 'lib/nydp/interpreted_function.rb', line 14 def container_class_name file, line = source_location [file.split(/\//).last, line].join(":") end |
#inspect ⇒ Object
18 19 20 |
# File 'lib/nydp/interpreted_function.rb', line 18 def inspect [@name, Nydp.nydp_from_backtrace(source_location.join(":"))].compact.join(" : ") end |
#is_named(name) ⇒ Object
28 29 30 |
# File 'lib/nydp/interpreted_function.rb', line 28 def is_named name @name = name end |
#nydp_type ⇒ Object
24 25 26 |
# File 'lib/nydp/interpreted_function.rb', line 24 def nydp_type :fn end |
#to_s ⇒ Object
11 12 13 |
# File 'lib/nydp/interpreted_function.rb', line 11 def to_s Nydp.nydp_from_backtrace(source_location.join(":")) end |