Module: Ric::Zibaldone

Defined in:
lib/ric/zibaldone.rb

Class Method Summary collapse

Class Method Details

.gemdirObject



6
7
8
# File 'lib/ric/zibaldone.rb', line 6

def self.gemdir
  File.dirname( File.dirname(__FILE__) + '/../../..' ) # Im in lib/ric/zibaldone.rb
end

.ric_helpObject



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/ric/zibaldone.rb', line 20

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
end

.say_helloObject



16
17
18
# File 'lib/ric/zibaldone.rb', line 16

def self.say_hello
  puts "Ric::Zibaldone.say_hello(): This hello is brought to you by ''#{yellow 'Riccardo Carlesso' rescue 'Riccardo Carlesso (Error with color yellow)'}''"
end

.versionObject



10
11
12
13
14
# File 'lib/ric/zibaldone.rb', line 10

def self.version
  # TODO memoize/cache this into @@version
  ver = File.read( File.expand_path('VERSION' , gemdir() ) )
  "(v.#{ver})" # for debug
end