Skip to content

Instantly share code, notes, and snippets.

@nitsujw
Created April 3, 2010 03:18

Revisions

  1. nitsujw created this gist Apr 3, 2010.
    24 changes: 24 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    class Popup
    def make
    "Making from instance"
    end

    def self.make
    "Making from class"
    end
    end

    irb(main):016:0* a = Popup.new
    => #<Popup:0xb768c100>
    irb(main):017:0> a.class
    => Popup
    irb(main):018:0> a.make
    => "Making from instance"


    irb(main):012:0> a = Popup
    => Popup
    irb(main):013:0> a.class
    => Class
    irb(main):014:0> a.make
    => "Making from class"