cli
cli copied to clipboard
Not working with crystal 0.30
The error is:
Error: abstract `def Enumerable(T)#each(&block)` must be implemented by Callback::ResultSet(T)
The code is one of your samples:
require "cli"
class Hello < Cli::Command
class Options
bool "--bye"
arg "to"
end
def run
if args.bye?
print "Goodbye"
else
print "Hello"
end
puts " #{args.to}!"
end
end
Hello.run %w(world) # prints "Hello, world!"
Hello.run %w(--bye world) # prints "Goodbye, world!"
@renich, use bcardiff's fork until his pull request gets merged.
Add this to your shard.yml:
dependencies:
cli:
# github: mosop/cli
github: bcardiff/cli
branch: bcardiff/use-fork
@mosop Any chance to merge bcardiff's branch? :)
I'm using
dependencies:
cli:
github: bcardiff/cli
branch: crystal/0.35.1