Skip to content

Instantly share code, notes, and snippets.

@fourseven
Last active August 29, 2015 13:56
Show Gist options
  • Save fourseven/9259219 to your computer and use it in GitHub Desktop.
Save fourseven/9259219 to your computer and use it in GitHub Desktop.

Revisions

  1. Mathew Hartley revised this gist Feb 27, 2014. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -4,13 +4,14 @@ end

    Using named params it would be (requires 2.1 to not have defaults):
    def self.find_bot(for_user:, from_token:)

    puts for_user
    end

    vs

    + (Bot *)findBotForUser:(User *) fromToken:(Oauth *)
    + (Bot *)findBotForUser:(User *)user fromToken:(Oauth *)token
    {
    NSLog(@"$@", user);
    }

    I like ObjC much more here.
  2. Mathew Hartley created this gist Feb 27, 2014.
    16 changes: 16 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    I have:
    def self.find_bot_for_user_from_token(current_user, oauth_token)
    end

    Using named params it would be (requires 2.1 to not have defaults):
    def self.find_bot(for_user:, from_token:)

    end

    vs

    + (Bot *)findBotForUser:(User *) fromToken:(Oauth *)
    {
    }

    I like ObjC much more here.