Class: Miron::Mironfile
- Inherits:
-
Object
- Object
- Miron::Mironfile
- Defined in:
- lib/miron/mironfile.rb
Instance Attribute Summary collapse
-
#app ⇒ Miron::Mironfile, Nil
readonly
Returns the contents of the Mironfile in the given dir, if any exists.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(&block) ⇒ Mironfile
constructor
A new instance of Mironfile.
-
#run(app) ⇒ Object
Takes an argument that is an object that responds to #call and returns a Response.
Constructor Details
#initialize(&block) ⇒ Mironfile
Returns a new instance of Mironfile.
21 22 23 |
# File 'lib/miron/mironfile.rb', line 21 def initialize(&block) instance_eval(&block) end |
Instance Attribute Details
#app ⇒ Miron::Mironfile, Nil (readonly)
Returns the contents of the Mironfile in the given dir, if any exists.
11 12 13 |
# File 'lib/miron/mironfile.rb', line 11 def app @app end |
Class Method Details
Instance Method Details
#run(app) ⇒ Object
Takes an argument that is an object that responds to #call and returns a Response.
class Heartbeat def self.call(request) Miron::Response.new(200, { "Content-Type" => "text/plain" }, "OK") end end
run Heartbeat
34 35 36 |
# File 'lib/miron/mironfile.rb', line 34 def run(app) @app = app end |