Class: CommandLion::Option

Inherits:
Command show all
Defined in:
lib/command_lion/option.rb

Overview

The Option class is a direct sub-class of the Command class. In pretty much every way it is just a command under the hood. However, instead of being indexed in an application’s commands index, it will be available in whatever command’s options index.

Example

app = CommandLion::App.build do
  command :example_command do
      # ...
    option :example_option do
      # ...
    end
  end
end

app.commands[:example_command].options[:example_option]

Method Summary

Methods inherited from Base

build, key_value, simple_attr, simple_attrs