Class: SiteHub::Cookie::Flag

Inherits:
Object
  • Object
show all
Includes:
Equality
Defined in:
lib/sitehub/cookie/flag.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Equality

#==, #_clazz, included

Constructor Details

#initialize(flag) ⇒ Flag

Returns a new instance of Flag.



9
10
11
# File 'lib/sitehub/cookie/flag.rb', line 9

def initialize(flag)
  @name = StringUtils.sanitise(flag).to_sym
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/sitehub/cookie/flag.rb', line 7

def name
  @name
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/sitehub/cookie/flag.rb', line 13

def to_s
  name.to_s
end