Class: Rail::Browser
- Inherits:
-
Object
- Object
- Rail::Browser
- Defined in:
- lib/rail/browser.rb
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
- #accept?(request) ⇒ Boolean
-
#initialize(config) ⇒ Browser
constructor
A new instance of Browser.
- #process(request) ⇒ Object
Constructor Details
Instance Attribute Details
#root ⇒ Object (readonly)
Returns the value of attribute root.
5 6 7 |
# File 'lib/rail/browser.rb', line 5 def root @root end |
Instance Method Details
#accept?(request) ⇒ Boolean
16 17 18 |
# File 'lib/rail/browser.rb', line 16 def accept?(request) File.exist?(File.join(root, request.path)) end |
#process(request) ⇒ Object
12 13 14 |
# File 'lib/rail/browser.rb', line 12 def process(request) @directory.call(request.env) end |