Sha256: 0f2c2b52d8a9948f08668c3fe09baed3e0c3f183982737fc078cf412b49b2304
Contents?: true
Size: 594 Bytes
Versions: 10
Compression:
Stored size: 594 Bytes
Contents
class Slh::Models::SitePath < Slh::Models::Base attr_reader :name, :parent_site attr_accessor :flavor, :specific_users # for usage when the flavor is :authentication_required_for_specific_users def initialize(site_path,parent_site,&block) @parent_site = parent_site if site_path.match(/^\/.+/) raise "Invalid site path: #{site_path}, leading slashes are NOT allowed except when protecting an entire site" end @name = site_path @flavor = :authentication_required @specific_users = [] if block_given? self.instance_eval(&block) end end end
Version data entries
10 entries across 10 versions & 1 rubygems