Module: Oracle
- Defined in:
- lib/cryptoquotes.rb
Defined Under Namespace
Classes: Tool
Class Method Summary collapse
- .main(args = ARGV) ⇒ Object
-
.say ⇒ Object
(also: says)
print a random crypto quote.
Class Method Details
.main(args = ARGV) ⇒ Object
132 133 134 |
# File 'lib/cryptoquotes.rb', line 132 def self.main( args=ARGV ) Tool.new.run( args ) end |
.say ⇒ Object Also known as: says
print a random crypto quote
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/cryptoquotes.rb', line 78 def self.say ## print a random crypto quote q = Quotes.random block_indent = 6 ## note: indent by six spaces for now ## puts ' Crypto Quote of the Day:' ## start with an empty line puts '' q['quote'].each_line do |line| print ' ' * block_indent print line end puts '' ## end with an empty line print ' ' * (block_indent+4) print "- #{q['by']}" print "\n" ## todo/fix: add date if availabe (month and year) - why? why not? puts '' ## end with an empty line end |