This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
history = [] | |
puts 'Hello! May I help you?' | |
while words = gets.chomp | |
history << words | |
break if history.last(3) == %w(BYE BYE BYE) | |
case words |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'bio' | |
def parse_st_comment(comment) | |
comment.scan(/##(.+)-START##\n(.*)\n##\1-END##/m).each_with_object({}) {|(tagset, block), memo| | |
i = 0 | |
memo[tagset] = block.lines.chunk {|line| |
OlderNewer