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

Version Path
lalala-4.1.0.dev.425 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.1.0.dev.420 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.1.0.dev.419 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.1.0.dev.418 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.1.0.dev.417 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.0.0.dev.416 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.1.0.dev.415 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.1.0.dev.414 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.1.0.dev.413 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.1.0.dev.412 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.1.0.dev.411 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.1.0.dev.410 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.1.0.dev.409 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.0.0.dev.407 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.1.0.dev.408 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.1.0.dev.398 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.1.0.dev.397 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.0.0.dev.396 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.0.0.dev.395 lib/generators/lalala/install/templates/helpers/pages_helper.rb
lalala-4.1.0.dev.394 lib/generators/lalala/install/templates/helpers/pages_helper.rb