Class: Quince::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/quince/config.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.props_struct_typeObject (readonly)

Returns the value of attribute props_struct_type.



4
5
6
# File 'lib/quince/config.rb', line 4

def props_struct_type
  @props_struct_type
end

.state_struct_typeObject (readonly)

Returns the value of attribute state_struct_type.



4
5
6
# File 'lib/quince/config.rb', line 4

def state_struct_type
  @state_struct_type
end

Class Method Details

.baseObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/quince/config.rb', line 6

def base
  props typed: ENV["RACK_ENV"] != "production"
  state typed: ENV["RACK_ENV"] != "production"
  sinatra_config do
    configure :development do
      if Object.const_defined? "Sinatra::Reloader"
        register Sinatra::Reloader
        dont_reload __FILE__
        also_reload $0
      end
    end
    enable :logging
    use Rack::JSONBodyParser
    use Rack::Deflater
    set :public_folder, File.join(File.dirname(File.expand_path($0)), "public")
  end
end