Method: Blueprinter::Base.view?
- Defined in:
- lib/blueprinter/base.rb
.view?(view_name) ⇒ Boolean
Check whether or not a Blueprint supports the supplied view. It accepts a view name.
class ExampleBlueprint < Blueprinter::Base
view :custom do
end
end
ExampleBlueprint.view?(:custom) => true
ExampleBlueprint.view?(:doesnt_exist) => false
supported by this Blueprint.
447 448 449 |
# File 'lib/blueprinter/base.rb', line 447 def self.view?(view_name) view_collection.view? view_name end |