class Srvy::Formatters::Base
Public Instance Methods
format_many(hosts)
click to toggle source
# File lib/srvy/formatters/base.rb, line 9 def format_many(hosts) # default to mapping over the collection with the format_single form # by having a separate format_many call, we can build formatters # that aggregate results in some way (such as producing a map of the hosts) hosts.map{|h| format_single h} end
format_single(host)
click to toggle source
# File lib/srvy/formatters/base.rb, line 5 def format_single(host) raise NotImplementedError end