Class: Anisoptera::App

Inherits:
Object
  • Object
show all
Defined in:
lib/anisoptera/app.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeApp

Returns a new instance of App.



16
17
18
# File 'lib/anisoptera/app.rb', line 16

def initialize
  @config = Config.new
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



14
15
16
# File 'lib/anisoptera/app.rb', line 14

def config
  @config
end

Instance Method Details

#configure(&block) ⇒ Object



20
21
22
# File 'lib/anisoptera/app.rb', line 20

def configure(&block)
  block.call @config
end

#endpoint(&block) ⇒ Object



24
25
26
# File 'lib/anisoptera/app.rb', line 24

def endpoint(&block)
  Anisoptera::Endpoint.factory(@config, block)
end