lib/ric.rb in ric-0.9.7 vs lib/ric.rb in ric-0.10.2alpha

- old
+ new

@@ -1,63 +1,25 @@ -# RICLIB! +# Riccardo New Stuff +require 'ric/colors' +require 'ric/html' +require 'ric/zibaldone' + +# riccardo Old SVN repository... +# require 'ruby_classes/strings' + +#if ActiveRecord::Base.respond_to?(:add_acts_as_carlesso_module) +# require 'rails/acts_as_carlesso' +# ActiveRecord::Base.send :include, Rails::ActsAsCarlesso +#end + +#puts "Ric: lib/riccardo_includes.rb Test Welcome to Riccardo Carlesso first gem :)" module Ric - $version - require File.expand_path('ric_colors.rb', File.dirname( __FILE__) ) - #include RicColors + #include Ric::Colors - def self.version - # TODO memoize/cache this into @@version - #File.read( 'VERSION' ) rescue "0.0.42_bugged" - #{}"0.9.6WET (See file in '#{Ric.gemdir}')" - File.read( File.expand_path('VERSION' , Ric.gemdir ) ) - end - - def self.say_hello - puts "Ric: Hello world by #{yellow 'Riccardo Carlesso' rescue 'Riccardo Carlesso Error'}" - end - def self.ric_help - ret = <<-HTML - == Ric (formerly RicLib) == - This is Riccardo library (my first gem!). Try the following commands maybe - Try some of the following: - - pred 'This is in red' - pyellow 'This is yellow instead' - - gemdir: #{ gemdir } - HTML - puts( ret ) - ret + puts :TODO end - alias :help :ric_help - #alias :about :ric_help - def self.gemdir - File.dirname( File.dirname(__FILE__) + '../' ) - end - - def foo - :bar - end - - def self.foo - 'self.bar' - end - - # you can require more than one gem and a symbol as well :) - def self.richiedi(gems) - puts "Riccardo personal super-'require'.. " - case gems.class.to_s - when 'String' - return require gems - when 'Array' - return require gems - else - return require gems.to_s - end - end - end -include Ric +include Ric::Colors \ No newline at end of file