Class: Perkins::AppProxy

Inherits:
Object show all
Defined in:
lib/perkins/dsl/app_proxy.rb

Constant Summary collapse

APP_ATTRIBUTES =
[:host, :port, :redis, :github_client_secret, :github_client_id ]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ AppProxy

Returns a new instance of AppProxy.



9
10
11
# File 'lib/perkins/dsl/app_proxy.rb', line 9

def initialize(options)
  @app = Application.new(options)
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



7
8
9
# File 'lib/perkins/dsl/app_proxy.rb', line 7

def app
  @app
end

Instance Method Details

#config(&block) ⇒ Object



18
19
20
# File 'lib/perkins/dsl/app_proxy.rb', line 18

def config(&block)
  @app.instance_eval &block
end

#server=(opts = {}) ⇒ Object



13
14
15
16
# File 'lib/perkins/dsl/app_proxy.rb', line 13

def server=(opts={})
  opts.each{|k,v| Server.set(k,v)}
  Server.set(:app , @app)
end