Class: Fp::Commands::Profile
Overview
fp profile add|list Manage named profiles for API authentication
Constant Summary collapse
- KNOWN_FLAGS =
{ api_key: :string, api_url: :string }.freeze
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Fp::Commands::Base
Instance Method Details
#run(args) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/fp/commands/profile.rb', line 13 def run(args) opts, positional = parse_flags(args, KNOWN_FLAGS) subcommand = positional.first case subcommand when 'add' add_profile(positional[1], opts) when 'list' list_profiles else show_usage end end |