require 'guard_helpers/base_helper' module ::GuardHelpers module RailsHelper include BaseHelper def start super if defined? super cmds = ::Pry::CommandSet.new do block_command "cn", "model columns name" do |model| m = Object.const_get(model.camelize.to_sym) column_name = m.columns.map(&:name) Out.raw_out column_name Out.out "file:#{File.basename __FILE__} line:#{__LINE__}", "red" end end ::Pry::Commands.import cmds end def run_on_modifications(paths) super if defined? super handle_each_path(%r{^db/schema\.rb$}) do |path| guard_reset end end module ClassMethods end end end