cuse 0.0.0 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/cuse.rb +11 -3
  2. metadata +1 -1
data/lib/cuse.rb CHANGED
@@ -1,5 +1,13 @@
1
- class Cuse
2
- def self.hi
3
- puts "Let's Go Orange!"
1
+ # "open" Kernel module, that's where the `puts` lives.
2
+ module Kernel
3
+ # our new puts
4
+ def puts_with_append *args
5
+ puts_without_append args.map{|a| a + "| Let's Go Orange!"}
4
6
  end
7
+
8
+ # back up name of old puts
9
+ alias_method :puts_without_append, :puts
10
+
11
+ # now set our version as new puts
12
+ alias_method :puts, :puts_with_append
5
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: