Class: HammerCLI::Output::Formatters::BooleanFormatter

Inherits:
FieldFormatter
  • Object
show all
Defined in:
lib/hammer_cli/output/formatters.rb

Instance Method Summary collapse

Methods inherited from FieldFormatter

#match?

Instance Method Details

#format(value, field_params = {}) ⇒ Object



159
160
161
# File 'lib/hammer_cli/output/formatters.rb', line 159

def format(value, field_params={})
  (value == 0 || !value || value == "") ? _("no") : _("yes")
end

#tagsObject



155
156
157
# File 'lib/hammer_cli/output/formatters.rb', line 155

def tags
  [:flat, :screen]
end