Module: Grape::Formatter::Txt

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

Class Method Summary collapse

Class Method Details

.call(object, env) ⇒ Object


5
6
7
# File 'lib/grape/formatter/txt.rb', line 5

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