Class: Redirect::App::StaticFile
- Inherits:
-
Object
- Object
- Redirect::App::StaticFile
- Defined in:
- lib/redirect/app.rb
Instance Method Summary collapse
- #available? ⇒ Boolean
- #expanded_path ⇒ Object
-
#initialize(path) ⇒ StaticFile
constructor
A new instance of StaticFile.
- #path ⇒ Object
Constructor Details
#initialize(path) ⇒ StaticFile
Returns a new instance of StaticFile.
6 7 8 9 |
# File 'lib/redirect/app.rb', line 6 def initialize(path) @path = path @path = File.join(path, 'index.html') unless available? end |
Instance Method Details
#available? ⇒ Boolean
11 12 13 |
# File 'lib/redirect/app.rb', line 11 def available? && == path && File.file?() end |
#expanded_path ⇒ Object
19 20 21 |
# File 'lib/redirect/app.rb', line 19 def File.(path) end |
#path ⇒ Object
15 16 17 |
# File 'lib/redirect/app.rb', line 15 def path @path end |