Skip to content

Instantly share code, notes, and snippets.

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

Revisions

  1. mikekelly revised this gist Mar 19, 2014. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions example.rb
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,11 @@
    # un-greppable delegate API

    class Foo
    delegate :qux, to: :bar, prefix: true
    end

    # possible fixes to the API to make it greppable

    class Foo
    delegate :bar_qux, to: :bar, prefixed: true
    end
  2. mikekelly revised this gist Mar 19, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion example.rb
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    class Foo
    delegate :bar_qux, to: :qux, prefixed: true
    delegate :bar_qux, to: :bar, prefixed: true
    end

    class Foo
  3. mikekelly renamed this gist Mar 19, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. mikekelly created this gist Mar 19, 2014.
    7 changes: 7 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    class Foo
    delegate :bar_qux, to: :qux, prefixed: true
    end

    class Foo
    delegate :bar_qux, prefixed_with: :bar
    end