Sha256: aa6de4af561340c7f0e76fd0afccf486c927420b79f218c9f57f3f787017037d
Contents?: true
Size: 1020 Bytes
Versions: 2
Compression:
Stored size: 1020 Bytes
Contents
class Object { # Let's define false, true & nil =) dynamic_method(':false) |g| { g push_false() g ret() } dynamic_method(':true) |g| { g push_true() g ret() } dynamic_method(':nil) |g| { g push_nil() g ret() } } class Class { def alias_method: new for: old { alias_method(new, old) } def ruby_alias: method_name { alias_method(":" + (method_name to_s), method_name) } def ruby_aliases: method_names { method_names each() |m| { ruby_alias: m } } } class String { alias_method: ":+" for: "+" alias_method: ":to_sym" for: "to_sym" } class Module { def included: module def include: modules { modules = modules to_a() modules reverse_each() |mod| { mod append_features: self mod send('included, self) } } } class Class{ def include: modules { modules = modules to_a() modules reverse_each() |mod| { mod append_features: self mod send('included, self) mod included: self } } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fancy-0.10.0 | lib/rbx/alpha.fy |
fancy-0.9.0 | lib/rbx/alpha.fy |