danielvlopes (owner)

Revisions

gist: 223174 Download_button fork
public
Public Clone URL: git://gist.github.com/223174.git
Embed All Files: show embed
class_package.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# CLASS AS PACKAGE
class Gateway
 
  class << self
    def authorize
      puts "authorize charge"
    end
 
    def charge
      puts "charge creditcard"
    end
 
    def url
      puts "url"
    end
  end
end
 
Gateway.authorize
Gateway.charge
Gateway.url