Closed voobscout closed 4 years ago
@voobscout Same issue for me
I’ll look at it today. Thanks for reporting, are you on the latest version? On Mon, Apr 16, 2018 at 8:29 AM Bar Hofesh notifications@github.com wrote:
@voobscout https://github.com/voobscout Same issue for me
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jwaldrip/admiral.cr/issues/10#issuecomment-381617982, or mute the thread https://github.com/notifications/unsubscribe-auth/AAConDIKdIePyUOtq2L5lN95SmM7kbpBks5tpKqwgaJpZM4TKvfy .
I'm using branch: HEAD
in my shard.yaml
Using master, head as well
imho this can be closed...
I would appreciate the ability to do this as well:
# hello.cr
require "admiral"
class Planetary < Admiral::Command
def run
puts "Hello World"
end
end
class Municipality < Admiral::Command
define_help description: "City"
class Zip < Admiral::Command
def run
puts "Hello City, Zip!"
end
end
def run
puts help
end
register_sub_command zip : Zip, description: "Nested subcommand"
end
class Hello < Admiral::Command
register_sub_command planet : Planetary, description: ""
register_sub_command city : Municipality, description: ""
define_help description: "Testing subcommands"
def run
puts help
end
end
Hello.run
Not sure even if it is possible to achieve, since i'm a crystal noob, but the ability to just inherit from Admiral::Command and stick that class as a subcommand of any other Admiral::Command sound quite awesome!
atm protected method 'parse_and_run' called for <classname>
appears when trying to run the above..
Couldn't get this to work, what am I missing?
In words, the expectation was to see:
But it never hits the Zip class.