Sha256: d6df6ad4eecb317e6b11cee9d3a6cd2e13f8e401cdf676137b5be6260c1c9081

Contents?: true

Size: 569 Bytes

Versions: 12

Compression:

Stored size: 569 Bytes

Contents

# coding: utf-8
module CLISplash

  class Documentation < Thor
    include Splash::Config
    include Splash::Exiter


    desc "readme", "Display README file"
    option :formatted, :type => :boolean, :default => true
    def readme
      filename = search_file_in_gem("prometheus-splash","README.md")

      if options[:formatted] then
        content = TTY::Markdown.parse_file(filename)
      else
        conten = File::readlines(filename).join
      end
      pager = TTY::Pager.new
      pager.page(content)
      splash_exit case: :quiet_exit
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
prometheus-splash-0.5.3 lib/splash/cli/documentation.rb
prometheus-splash-0.5.2 lib/splash/cli/documentation.rb
prometheus-splash-0.5.0 lib/splash/cli/documentation.rb
prometheus-splash-0.4.5 lib/splash/cli/documentation.rb
prometheus-splash-0.4.4 lib/splash/cli/documentation.rb
prometheus-splash-0.4.3 lib/splash/cli/documentation.rb
prometheus-splash-0.4.2 lib/splash/cli/documentation.rb
prometheus-splash-0.4.1 lib/splash/cli/documentation.rb
prometheus-splash-0.4.0 lib/splash/cli/documentation.rb
prometheus-splash-0.3.0 lib/splash/cli/documentation.rb
prometheus-splash-0.2.0 lib/splash/cli/documentation.rb
prometheus-splash-0.1.1 lib/splash/cli/documentation.rb