Top Level Namespace
Defined Under Namespace
Modules: Trollop Classes: Command, Commander, CompileCommand, Console, DebugCommand, DefaultCommand, EditCommand, File, GenerateCommand, HelpCommand, InstallCommand, ListCommand, Rcli, TraceableFactory, TraceableObject, UninstallCommand, VersionCommand
Constant Summary collapse
- DS =
set to true by command line
File::SEPARATOR
Instance Method Summary collapse
-
#camelize(lower_case_and_underscored_word, first_letter_in_uppercase = true) ⇒ Object
# shortcut to call a class method that you would like to be traceable def ccm(className, sym, *args, &block) TraceableObject.call_class_method(className, sym, *args, &block) end # shortcut to instantiate a traceable object def cto(className) TraceableFactory.createTraceableObject(className) end.
-
#date ⇒ Object
- 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.
- #f ⇒ Object
- #s ⇒ Object
Instance Method Details
#camelize(lower_case_and_underscored_word, first_letter_in_uppercase = true) ⇒ Object
# shortcut to call a class method that you would like to be traceable def ccm(className, sym, *args, &block)
TraceableObject.call_class_method(className, sym, *args, &block)
end # shortcut to instantiate a traceable object def cto(className)
TraceableFactory.createTraceableObject(className)
end
10 11 12 13 14 15 16 |
# File 'lib/core/global_functions.rb', line 10 def camelize(lower_case_and_underscored_word, first_letter_in_uppercase = true) if first_letter_in_uppercase lower_case_and_underscored_word.to_s.gsub(/\/(.?)/) { "::" + $1.upcase }.gsub(/(^|_)(.)/) { $2.upcase } else lower_case_and_underscored_word.first + camelize(lower_case_and_underscored_word)[1..-1] end end |
#date ⇒ Object
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/vendor/trollop.rb', line 6 require 'date' |
#f ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/core/tracer.rb', line 13 def f trace = '' m = caller[0][/`([^']*)'/, 1] if "#{self.class}" == "Class" trace = "-- f - #{self}::#{m}() --- " else trace = "-- f - #{self.class}.#{m}() --- " end puts trace if TRACE_APP end |
#s ⇒ Object
1 2 3 4 5 6 7 8 9 10 11 |
# File 'lib/core/tracer.rb', line 1 def s trace = '' m = caller[0][/`([^']*)'/, 1] if "#{self.class}" == "Class" trace = "-- s - #{self}::#{m}() --- " else trace = "-- s - #{self.class}.#{m}() --- " end puts trace if TRACE_APP end |