Skip to content

Instantly share code, notes, and snippets.

@josevalim
Created January 15, 2010 22:32
Show Gist options
  • Select an option

  • Save josevalim/278476 to your computer and use it in GitHub Desktop.

Select an option

Save josevalim/278476 to your computer and use it in GitHub Desktop.
class Bubble::Cli::Add < Base
class_option :force, :aliases => "-f", :type => :boolean, :default => false,
:desc => "Force"
def first_step
end
def second_step
end
def third_step
end
protected
def not_executed
end
end
# The base class have some common configuration and options
class Bubble::Cli::Base < Thor::Group
class_option :track, :type => :string, :aliases => "-t",
:desc => "Track something"
end
class Bubble::Cli::Remove < Base
# We don't need it here
remove_class_option :track
# Logic
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment