Class: Cinch::Plugins::Alton

Inherits:
Object
  • Object
show all
Includes:
Cinch::Plugin
Defined in:
lib/cinch/plugins/alton.rb

Instance Method Summary collapse

Instance Method Details

#execute(m) ⇒ Object


14
15
16
17
18
# File 'lib/cinch/plugins/alton.rb', line 14

def execute(m)
  doc = Nokogiri::HTML(open('http://xkeeper.net/grandma.php'))
  line = doc.at("div").children.select {|n| n.text? and n.content }[1].text
  m.reply Format(:bold,"Grandma Alton:") + " \"#{line}\""
end