Class: Grape::Formatter::Txt

Inherits:
Base
  • Object
show all
Defined in:
lib/grape/formatter/txt.rb

Class Method Summary collapse

Methods inherited from Base

inherited

Class Method Details

.call(object, _env) ⇒ Object



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

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