Class: Metro::Views::NoView

Inherits:
Object
  • Object
show all
Defined in:
lib/metro/views/no_view.rb

Class Method Summary collapse

Class Method Details

.exists?(view_path) ⇒ Boolean

A NoView is a last resort view which means this is will always will exist.

Parameters:

  • view_path (String)

    the name of the view to find

Returns:

  • (Boolean)

    a true all the time as this is the last resort format.



12
13
14
# File 'lib/metro/views/no_view.rb', line 12

def self.exists?(view_path)
  true
end

.formatObject

Returns the file type format of this view.

Returns:

  • the file type format of this view.



27
28
29
# File 'lib/metro/views/no_view.rb', line 27

def self.format
  :none
end

.parse(view_path) ⇒ Object

A NoView will return an empty Hash to provide compatibility with other view types.



20
21
22
# File 'lib/metro/views/no_view.rb', line 20

def self.parse(view_path)
  {}
end