Module: Grape::Formatter::Txt

Defined in:
lib/grape/formatter/txt.rb

Class Method Summary collapse

Class Method Details

.call(object, _env) ⇒ Object



7
8
9
# File 'lib/grape/formatter/txt.rb', line 7

def call(object, _env)
  object.respond_to?(:to_txt) ? object.to_txt : object.to_s
end