Skip to content

Instantly share code, notes, and snippets.

@chaboo
Last active January 3, 2016 18:39
Show Gist options
  • Select an option

  • Save chaboo/8503224 to your computer and use it in GitHub Desktop.

Select an option

Save chaboo/8503224 to your computer and use it in GitHub Desktop.

Revisions

  1. chaboo revised this gist Jan 19, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions include vs extend
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    ``include``: adds methods from the provided Module to the object
    **extend**: calls include on the singleton class of the object
    include: adds methods from the provided Module to the object
    extend: calls include on the singleton class of the object

    - http://ficate.com/blog/2012/01/17/explaining-include-and-extend/
    - http://confreaks.com/videos/825-mwrc2008-ruby-internals
  2. chaboo revised this gist Jan 19, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion include vs extend
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    **include**: adds methods from the provided Module to the object
    ``include``: adds methods from the provided Module to the object
    **extend**: calls include on the singleton class of the object

    - http://ficate.com/blog/2012/01/17/explaining-include-and-extend/
  3. chaboo revised this gist Jan 19, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions include vs extend
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    include: adds methods from the provided Module to the object
    extend: calls include on the singleton class of the object
    **include**: adds methods from the provided Module to the object
    **extend**: calls include on the singleton class of the object

    - http://ficate.com/blog/2012/01/17/explaining-include-and-extend/
    - http://confreaks.com/videos/825-mwrc2008-ruby-internals
  4. chaboo revised this gist Jan 19, 2014. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions include vs extend
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    include: adds methods from the provided Module to the object
    extend: calls include on the singleton class of the object

    - http://ficate.com/blog/2012/01/17/explaining-include-and-extend/
    - http://confreaks.com/videos/825-mwrc2008-ruby-internals
    - http://stackoverflow.com/questions/156362/what-is-the-difference-between-include-and-extend-in-ruby
  5. chaboo renamed this gist Jan 19, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. chaboo revised this gist Jan 19, 2014. No changes.
  7. chaboo created this gist Jan 19, 2014.
    3 changes: 3 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    - http://ficate.com/blog/2012/01/17/explaining-include-and-extend/
    - http://confreaks.com/videos/825-mwrc2008-ruby-internals
    - http://stackoverflow.com/questions/156362/what-is-the-difference-between-include-and-extend-in-ruby