Created
June 12, 2014 22:55
-
-
Save AntelopeSalad/e00d2b9f159cfdfda5fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module YourGem | |
class Bar | |
def initialize(something, options = {}) | |
@something = something | |
@options = options | |
end | |
def world | |
puts 'world' | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'thor' | |
require 'yourgem/foo' | |
require 'yourgem/bar' | |
module YourGem | |
class CLI < Thor | |
def foo(something) | |
Foo.new(something, options).hello | |
end | |
def bar(something) | |
Bar.new(something, options).world | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module YourGem | |
class Foo | |
def initialize(something, options = {}) | |
@something = something | |
@options = options | |
end | |
def hello | |
puts 'hello' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment