Skip to content

Instantly share code, notes, and snippets.

@AntelopeSalad
Created June 12, 2014 22:55
Show Gist options
  • Save AntelopeSalad/e00d2b9f159cfdfda5fe to your computer and use it in GitHub Desktop.
Save AntelopeSalad/e00d2b9f159cfdfda5fe to your computer and use it in GitHub Desktop.
module YourGem
class Bar
def initialize(something, options = {})
@something = something
@options = options
end
def world
puts 'world'
end
end
end
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
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