module Crowbar::Client::Mixin::Format
A mixin with formatter related helpers
Public Instance Methods
json?()
click to toggle source
# File lib/crowbar/client/mixin/format.rb, line 48 def json? options[:json] end
plain?()
click to toggle source
# File lib/crowbar/client/mixin/format.rb, line 52 def plain? options[:plain] end
provide_format()
click to toggle source
# File lib/crowbar/client/mixin/format.rb, line 29 def provide_format case when json? options[:format] = :json when plain? options[:format] = :plain when table? options[:format] = :table end if options[:format].nil? :table else options[:format].to_sym end end
table?()
click to toggle source
# File lib/crowbar/client/mixin/format.rb, line 56 def table? options[:table] end