Class: MediaTypes::Formatter
- Defined in:
- lib/media_types/formatter.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Hash
Class Method Details
.call(*args, **options) ⇒ Object
9 10 11 |
# File 'lib/media_types/formatter.rb', line 9 def call(*args, **) new(*args, **).call end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 |
# File 'lib/media_types/formatter.rb', line 14 def call filtered_arguments = arguments return template if MediaTypes::Object.new(filtered_arguments).empty? format(rework_template(filtered_arguments), filtered_arguments) end |