Created
October 20, 2011 08:18
-
-
Save richo/1300656 to your computer and use it in GitHub Desktop.
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
module Twat::Endpoints | |
class Identica | |
def initialize | |
::Twitter.module_eval do | |
Request.module_eval do | |
def request(method, path, params, options) | |
path.gsub!(%r|^/1|, '') | |
super(method, path, params, options) | |
end | |
end | |
end | |
end | |
# this bails with /home/richo/code/ext/twat/lib/twat/endpoints/identica.rb:6:in `block in initialize': uninitialized constant Twat::Endpoints::Identica::Request (NameError) | |
# So I figured it's still relative to This module, so I tried | |
# | |
# ::Twitter.module_eval... | |
# but it bails with the same error | |
def url | |
"https://identi.ca/api" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment