Module: TopLevelExtensions
- Defined in:
- lib/paned_repl/top_level_extensions.rb
Instance Method Summary collapse
Instance Method Details
#exit_tmux ⇒ Object
6 7 8 9 10 |
# File 'lib/paned_repl/top_level_extensions.rb', line 6 def exit_tmux panes.data.values.sort.reverse.each &base.method(:kill_pane) `pkill tmux` exit end |
#to_shell_command(ruby_string) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/paned_repl/top_level_extensions.rb', line 12 def to_shell_command(ruby_string) if ["\"", "\'"].any? &cmd_fragment.method(:include?) raise ArgumentError, "fragment cant have quotes" end <<-SH ruby -e '#{cmd_fragment}' SH end |