Class: Wikipedia::Excerpt

Inherits:
Struct
  • Object
show all
Defined in:
lib/cinch/plugins/miwiki/wikipedia.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#summaryObject

Returns the value of attribute summary


9
10
11
# File 'lib/cinch/plugins/miwiki/wikipedia.rb', line 9

def summary
  @summary
end

#titleObject

Returns the value of attribute title


9
10
11
# File 'lib/cinch/plugins/miwiki/wikipedia.rb', line 9

def title
  @title
end

#typeObject

Returns the value of attribute type


9
10
11
# File 'lib/cinch/plugins/miwiki/wikipedia.rb', line 9

def type
  @type
end

Instance Method Details

#title_to_urlObject


10
11
12
# File 'lib/cinch/plugins/miwiki/wikipedia.rb', line 10

def title_to_url
  %q{http://en.wikipedia.org/w/index.php?title=%s} % [CGI.escape(self.title.gsub(/\s/, '_'))]
end