RubyData / rubydown

rubydown is pure-Ruby R Markdown clone
https://rubygems.org/gems/rubydown
MIT License
16 stars 2 forks source link

Option arguments checking #7

Open kozo2 opened 5 years ago

kozo2 commented 5 years ago

For example, If there is no -o (output) argument in rubydown command line, rubydown prints this error. This is difficult to understand. We need to add option arguments checking code.

rubydown -i /usr/local/bundle/gems/rubydown-0.1.0/examples/data_science.md -e /usr/local/bundle/gems/r
ubydown-0.1.0/templates/template.html.erb /data/a/Desktop/hoge.html
Traceback (most recent call last):
        4: from /usr/local/bundle/bin/rubydown:23:in `<main>'
        3: from /usr/local/bundle/bin/rubydown:23:in `load'
        2: from /usr/local/bundle/gems/rubydown-0.1.0/exe/rubydown:100:in `<top (required)>'
        1: from /usr/local/bundle/gems/rubydown-0.1.0/exe/rubydown:96:in `main'
/usr/local/bundle/gems/rubydown-0.1.0/exe/rubydown:96:in `write': no implicit conversion of nil into String (TypeError)