class RubyPatchesMerger::Revisions::Revision

Public Class Methods

new(revision, base = 'http://svn.ruby-lang.org') click to toggle source
# File lib/ruby_patches_merger/revisions.rb, line 27
def initialize(revision, base = 'http://svn.ruby-lang.org')
  @revision = revision
  @revision = @revision[1..-1] if @revision.start_with?("r")
  @base = base
end

Public Instance Methods

content() click to toggle source
# File lib/ruby_patches_merger/revisions.rb, line 35
def content
  @content ||= Nokogiri::HTML(open(revision_url))
end
hrefs() click to toggle source
# File lib/ruby_patches_merger/revisions.rb, line 38
def hrefs
  content.css("a[title='View Diff']").map{|link| link["href"]}
end
revision_url() click to toggle source
# File lib/ruby_patches_merger/revisions.rb, line 32
def revision_url
  "#{@base}/cgi-bin/viewvc.cgi?revision=#{@revision}&view=revision"
end
to_s() click to toggle source
# File lib/ruby_patches_merger/revisions.rb, line 44
def to_s
  @revision
end