Module: Rcodetools

Defined in:
lib/rcodetools/doc.rb,
lib/rcodetools/fork.rb,
lib/rcodetools/options.rb,
lib/rcodetools/xmpfilter.rb,
lib/rcodetools/completion.rb,
lib/rcodetools/fork_config.rb,
lib/rcodetools/xmptestunitfilter.rb

Overview

by rubikitch <[email protected]>

Defined Under Namespace

Modules: Fork, OptionHandler, ProcessParticularLine Classes: XMPAddMarkers, XMPCompletionClassInfoFilter, XMPCompletionEmacsAnythingFilter, XMPCompletionEmacsFilter, XMPCompletionEmacsIciclesFilter, XMPCompletionFilter, XMPCompletionVerboseFilter, XMPDocFilter, XMPExpectationsFilter, XMPFilter, XMPRSpecFilter, XMPReFeFilter, XMPRiEmacsFilter, XMPRiFilter, XMPRiVimFilter, XMPTestUnitFilter

Constant Summary collapse

DEFAULT_OPTIONS =
{
:interpreter       => "ruby",
:options => ["hoge"],
:min_codeline_size => 50,
:width             => 79,
:libs              => [],
:evals             => [],
:include_paths     => [],
:dump              => nil,
:wd                => nil,
:warnings          => true,
:use_parentheses   => true,
:column            => nil,
:output_stdout     => true,
:test_script       => nil,
:test_method       => nil,
:detect_rct_fork   => false,
:use_rbtest        => false,
:detect_rbtest     => false,
:execute_ruby_tmpfile => false,
}
FLOAT_TOLERANCE =
0.0001

Instance Method Summary collapse

Instance Method Details

#check_opts(options) ⇒ Object



106
107
108
109
110
111
112
113
# File 'lib/rcodetools/options.rb', line 106

def check_opts(options)
  if options[:test_script]
    unless options[:filename]
      $stderr.puts "You must specify --filename as well as -t(--test)."
      exit 1
    end
  end
end

#set_extra_opts(options) ⇒ Object



97
98
99
100
101
102
103
104
# File 'lib/rcodetools/options.rb', line 97

def set_extra_opts(options)
  if idx = ARGV.index("--")
    options[:options] = ARGV[idx+1..-1]
    ARGV.replace ARGV[0...idx]
  else
    options[:options] = []
  end
end