Class: Binding
- Inherits:
-
Object
- Object
- Binding
- Defined in:
- lib/meta-utils.rb
Instance Method Summary collapse
Instance Method Details
#p(debug_str) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/meta-utils.rb', line 6 def p debug_str str = '' separator = '' variables = debug_str.split(',').map { |v| v.strip } variables.each do |var| result = eval var, self str += "#{separator}#{var}=#{result.inspect.strip}" separator = ', ' end puts str end |