Method: Textbringer::RubyMode#default_compile_command

Defined in:
lib/textbringer/modes/ruby_mode.rb

#default_compile_commandObject



150
151
152
153
154
155
156
157
158
159
160
# File 'lib/textbringer/modes/ruby_mode.rb', line 150

def default_compile_command
  @buffer[:ruby_compile_command] ||
    if File.exist?("Rakefile")
      prefix = File.exist?("Gemfile") ? "bundle exec " : ""
      prefix + "rake"
    elsif @buffer.file_name
      ruby_install_name + " " + @buffer.file_name
    else
      nil
    end
end