Class: Endpoint
- Inherits:
-
Object
- Object
- Endpoint
- Defined in:
- lib/oncall/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(route) ⇒ Endpoint
constructor
A new instance of Endpoint.
- #parse(filename) ⇒ Object
Constructor Details
#initialize(route) ⇒ Endpoint
Returns a new instance of Endpoint.
9 10 11 12 13 14 |
# File 'lib/oncall/cli.rb', line 9 def initialize(route) @route = route @config = { 'develop' => { 'domain' => 'localhost', 'port' => 4567 } } end |
Class Method Details
.define(route, &block) ⇒ Object
24 25 26 |
# File 'lib/oncall/cli.rb', line 24 def Endpoint.define(route, &block) new(route).instance_eval(&block) end |
Instance Method Details
#parse(filename) ⇒ Object
16 17 18 |
# File 'lib/oncall/cli.rb', line 16 def parse(filename) instance_eval File.read(filename) end |