danielvlopes (owner)

Revisions

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