Sha256: b3b4cfc080d762db9e9e77e0366a9dac90e5bb2493bd5f5836849d0f9a7733fb
Contents?: true
Size: 473 Bytes
Versions: 1
Compression:
Stored size: 473 Bytes
Contents
require 'thor' require 'yao/cli/formatter' module Yao::Cli class Base < Thor class_option :format, :type => :string, :default => "json", :aliases => :f, :enum => Yao::Cli::Formatter.formats, :desc => "Output format" private def pretty_output(obj) puts Yao::Cli::Formatter.get(options[:format]).dump(obj) end def is_uuid?(str) /^[\da-f]{32}$/ === str or /^[\da-f]{8}-([\da-f]{4}-){3}[\da-f]{12}$/ === str end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
yao-cli-0.1.0 | lib/yao/cli/base.rb |