Class: Proc
- Defined in:
- lib/rmtools/core/b.rb,
lib/rmtools/core/proc.rb,
lib/rmtools/dev/highlight.rb
Constant Summary collapse
- NULL =
lambda {|*x|}
- TRUE =
lambda {|*x| true}
- FALSE =
lambda {|*x| false}
- SELF =
lambda {|x| x}
Instance Attribute Summary collapse
-
#string ⇒ Object
Returns the value of attribute string.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#string ⇒ Object
Returns the value of attribute string.
7 8 9 |
# File 'lib/rmtools/core/proc.rb', line 7 def string @string end |
Class Method Details
Instance Method Details
#inspect ⇒ Object
28 29 30 |
# File 'lib/rmtools/dev/highlight.rb', line 28 def inspect "#{to_s}#{@string ? ': '+Painter.green(@string) : source_location && ":\n"+RMTools.highlighted_line(*source_location)}" end |
#source_location ⇒ Object
30 |
# File 'lib/rmtools/core/proc.rb', line 30 def source_location; to_s.match(/([^@]+):(\d+)>$/)[1..2] end |
#when ⇒ Object
9 10 11 12 13 14 |
# File 'lib/rmtools/core/proc.rb', line 9 def when Thread.new do sleep 0.001 until yield call end end |