Top Level Namespace

Defined Under Namespace

Modules: Flustered, Innate, Kernel, Trollop Classes: Command, Object, SystemUniversal

Constant Summary collapse

SystemU =
SystemUniversal
Systemu =
SystemUniversal

Instance Method Summary collapse

Instance Method Details

#dateObject

lib/trollop.rb – trollop command-line processing library

Author

William Morgan (mailto: [email protected])

Copyright

Copyright 2007 William Morgan

License

the same terms as ruby itself



6
# File 'lib/flustered/vendored_trollop.rb', line 6

require 'date'

#get_doc(name) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/flustered/adapters/minitest.rb', line 21

def get_doc name
  require 'yard'
  require 'stringio'

  YARD::CLI::YRI::DEFAULT_SEARCH_PATHS.push('.flustered.yardoc')
  yri = YARD::CLI::YRI.new

  out = StringIO.new
  $stdout = out
  hasdoc = yri.send(:find_object, name) != nil
  YARD::CLI::YRI.new.run('--no-pager', name) if hasdoc
ensure
  $stdout = STDOUT

  out.read

end

#suppress_autorunObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/flustered/adapters/minitest.rb', line 6

def suppress_autorun
  Class.new(MiniTest::Unit) do
    # A warning is generated when class instance variables are modified from
    # anonymous classes.  Need to use class_variable_set, which is public in
    # 1.9 and private in 1.8.
    # See http://sequel.heroku.com/2010/06/17/ruby-192-compatibility/
    #
    self.send :class_variable_set, :@@installed_at_exit, true
  end
end