Module: TrelloDXY::CLI::Commands::Shared
- Included in:
- Board
- Defined in:
- lib/trello_dxy/cli/commands/shared.rb
Instance Method Summary collapse
Instance Method Details
#actions(obj = self) ⇒ Object
5 6 7 |
# File 'lib/trello_dxy/cli/commands/shared.rb', line 5 def actions(obj = self) (obj.methods - obj.class.superclass.instance_methods).sort - shared_methods end |
#help ⇒ Object
17 18 19 20 |
# File 'lib/trello_dxy/cli/commands/shared.rb', line 17 def help puts "Valid commands for #{target_name}: #{actions.join(', ')}" puts "For further help, append -h to sub command." end |
#shared_methods ⇒ Object
9 10 11 |
# File 'lib/trello_dxy/cli/commands/shared.rb', line 9 def shared_methods TrelloDXY::CLI::Commands::Shared.instance_methods end |
#target_name ⇒ Object
13 14 15 |
# File 'lib/trello_dxy/cli/commands/shared.rb', line 13 def target_name self.class.name.downcase.split('::').last end |