class Help
Public Class Methods
all()
click to toggle source
# File lib/before_tickets.rb, line 39 def self.all DATA['steps'].each do |row| puts_data_splitting_by_newline(row) end HIHY end
me()
click to toggle source
# File lib/before_tickets.rb, line 22 def self.me data = DATA['steps'].sample puts_data_splitting_by_newline(data) HIHY end
search(word)
click to toggle source
# File lib/before_tickets.rb, line 28 def self.search(word) found_data = false DATA['steps'].each do |row| if row.downcase.include?(word.downcase) puts_data_splitting_by_newline(row) found_data = true end end found_data ? HIHY : 'Sorry, I couldnt find any quote with that word' end