Class: Blossom::Application::Configuration

Inherits:
Struct
  • Object
show all
Defined in:
lib/blossom.rb

Overview


Defined Under Namespace

Classes: Value

Constant Summary collapse

DEFAULTS =
YAML.load <<"^D"
Public-Directory: public
Public-Extensions: js css html png jpg
Max-Cache-Time: 1 day
Remove-WWW-From-Domain: yes
^D

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#user_dataObject

Returns the value of attribute user_data

Returns:

  • (Object)

    the current value of user_data



185
186
187
# File 'lib/blossom.rb', line 185

def user_data
  @user_data
end

Instance Method Details

#max_ageObject



197
198
# File 'lib/blossom.rb', line 197

def max_age
get("Max-Cache-Time").duration end

#public_directoryObject



193
194
# File 'lib/blossom.rb', line 193

def public_directory
get("Public-Directory").string end

#public_extensionsObject



199
200
# File 'lib/blossom.rb', line 199

def public_extensions
get("Public-Extensions").words end

#strip_www?Boolean

Returns:

  • (Boolean)


195
196
# File 'lib/blossom.rb', line 195

def strip_www?
get("Remove-WWW-From-Domain").boolean end