class Sah::Formatter
Public Class Methods
new(format: "table")
click to toggle source
# File lib/sah/formatter.rb, line 6 def initialize(format: "table") @format = case format when "table" Format::Hirb when "json" Format::Json else abort "format must be set to json or table: #{format}" end end
Public Instance Methods
render(*args)
click to toggle source
# File lib/sah/formatter.rb, line 17 def render(*args) @format.render(*args) end