Sha256: d4d54f68d373b7c1530feb5f7481fabe82a8df26a881a4060f4f49cc62ecb4f6

Contents?: true

Size: 295 Bytes

Versions: 2

Compression:

Stored size: 295 Bytes

Contents

module PageFactory
  def self.current_factory
    @current_factory ||= PageFactory::Base
  end

  def self.current_factory=(factory)
    factory = factory.constantize if factory.is_a?(String)
    if factory.nil? or factory <= PageFactory::Base
      @current_factory = factory
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
radiant-page_factory-extension-1.0.1 lib/page_factory.rb
radiant-page_factory-extension-1.0.0 lib/page_factory.rb