class Octokit::Gist
Class to parse and create Gist URLs
def self.from_url(url)
Instantiate {Gist} object from Gist URL
def self.from_url(url) Gist.new(URI.parse(url).path[1..]) end
def initialize(gist)
def initialize(gist) case gist when Integer, String @id = gist.to_s end end
def to_s
-
(String)-
def to_s @id end
def url
-
(String)-
def url "https://gist.github.com/#{@id}" end