Skip to content

Commit

Permalink
[Docs] Document Command.option
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Mar 12, 2016
1 parent c797276 commit c1717df
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/claide/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,16 @@ def self.options
end
end

# Adds a new option for the current command.
#
# This method can be used in conjunction with overriding `options`.
#
# @return [void]
#
# @example
#
# option '--help', 'Print help banner '
#
def self.option(name, description)
mod = Module.new do
define_method(:options) do
Expand Down

0 comments on commit c1717df

Please sign in to comment.