Benutzer:Oneup/Hence Ruby Owns Your Ass

aus Metalab Wiki, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
< Benutzer:Oneup
Version vom 28. Juni 2009, 23:59 Uhr von Pk (Diskussion | Beiträge) (hat Hence Ruby Owns Your Ass nach Benutzer:Oneup/Hence Ruby Owns Your Ass verschoben: I accidentally your whole name space)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springenZur Suche springen

here we sort & order various smart tidbits we stumble upon while ordering ruby's word dictionary.

module Janitor
    def initialize
        super
        puts "janitor"
    end
end

module Xanitor
    def initialize
       super
       puts "xanitor"
    end
end

class C
 include Janitor
 include Xanitor
end

C.new



# OUTPUT:
# janitor
# xanitor

# hence we have the capability to horizontally apprehend features in ruby
# (class super only works vertically)