Class: HammerCLI::Output::Formatters::DateFormatter
Instance Method Summary
collapse
inherited, #match?, #tags
Instance Method Details
100
101
102
103
104
105
|
# File 'lib/hammer_cli/output/formatters.rb', line 100
def format(string_date, _={})
t = DateTime.parse(string_date.to_s)
t.strftime("%Y/%m/%d %H:%M:%S")
rescue ArgumentError
""
end
|
#required_features ⇒ Object
94
95
96
97
98
|
# File 'lib/hammer_cli/output/formatters.rb', line 94
def required_features
return %i[serialized] if tags.empty?
tags.map { |t| HammerCLI::Output::Utils.tag_to_feature(t) }
end
|