class Application

Provides an interface for helper methods to know which view is being rendered so they can branch conditionally.

Public Class Methods

current_view() click to toggle source

Returns the name of the current view.

# File lib/ymdp/view/application.rb, line 13
def self.current_view
  @@current_view
end
current_view=(view) click to toggle source

Sets the name of the current view.

# File lib/ymdp/view/application.rb, line 19
def self.current_view= view
  @@current_view = view
end
current_view?(view) click to toggle source

Returns true if view is the current view which is being rendered.

# File lib/ymdp/view/application.rb, line 7
def self.current_view?(view)
  current_view.downcase == view.downcase
end