class RubyDictionary::CLI
Public Instance Methods
call()
click to toggle source
# File lib/ruby_dictionary/cli.rb, line 5 def call RubyDictionary::Scraper.scrape_index puts "Welcome to the Ruby Dictionary!" scrape_slow_classes list_klasses main_menu goodbye end
goodbye()
click to toggle source
# File lib/ruby_dictionary/cli.rb, line 117 def goodbye puts "Happy Coding!!!" end
list_klasses()
click to toggle source
# File lib/ruby_dictionary/cli.rb, line 21 def list_klasses RubyDictionary::Klass.all.each.with_index{|k,i| puts "#{i + 1}. #{k.name}"} puts "\nEnter the Class or Mixin you would like to explore, or type 'exit' to quit" end
scrape_slow_classes()
click to toggle source
# File lib/ruby_dictionary/cli.rb, line 14 def scrape_slow_classes @array = RubyDictionary::Klass.list[0] RubyDictionary::Scraper.scrape_klass(@array) @enum = RubyDictionary::Klass.list[2] RubyDictionary::Scraper.scrape_klass(@enum) end