Sha256: 684110fbf1ae86fcc8536e5a262ee46d7a78c1f7bcf4d82515cc164960a5ba18
Contents?: true
Size: 346 Bytes
Versions: 73
Compression:
Stored size: 346 Bytes
Contents
class Lalala::Pages::PageTypeConstraint def initialize(type) unless Class === type type = type.to_s.classify type += "Page" unless type.ends_with?("Page") type = type.constantize end @type = type end def matches?(request) request.env['lalala.page'] and @type === request.env['lalala.page'] end end
Version data entries
73 entries across 73 versions & 1 rubygems