Sha256: 55288899057de676799e91730cf2d2dc2ef4babbd6129bae275ac6c6c4c2a8c2
Contents?: true
Size: 343 Bytes
Versions: 35
Compression:
Stored size: 343 Bytes
Contents
module PagesHelper # Returns page by class name & puts it in an instance variable # # @param {Class} page_class # # @return {ApplicationPage} def get_page(page_class) key = "@#{page_class.to_s.underscore.to_sym}" page = instance_variable_get(key) page ||= instance_variable_set(key, page_class.first) end end
Version data entries
35 entries across 35 versions & 1 rubygems