Sha256: 3c1c581221d800769f7d3950bc63a9c0a4bf454be880c13034644ab03c2cd28c
Contents?: true
Size: 662 Bytes
Versions: 9
Compression:
Stored size: 662 Bytes
Contents
module PryMoves::Vars extend self def var_precedence action, target if Pry.config.ignore_once_var_precedence Pry.config.ignore_once_var_precedence = false return end input = Pry.config.original_user_input || action.to_s return if %w[next debug].include? input # next - ruby keyword begin binding_value = target.eval(input) puts "ℹ️️ Variable \"#{input}\" found. To execute command type its alias or \\#{input}" puts PryMoves::Painter.colorize binding_value true rescue => e # puts (e.backtrace.reverse + ["var_precedence exception:".red, "#{e}".red]).join "\n" end end end
Version data entries
9 entries across 9 versions & 1 rubygems