Provides an interface for helper methods to know which view is being rendered so they can branch conditionally.
Returns the name of the current view.
# File lib/ymdp/view/application.rb, line 13 def self.current_view @@current_view end
Sets the name of the current view.
# File lib/ymdp/view/application.rb, line 19 def self.current_view= view @@current_view = view end
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