Class: RailsFinder::App
- Inherits:
-
Object
- Object
- RailsFinder::App
- Defined in:
- lib/rails_finder/app.rb
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
- #basename ⇒ Object
-
#initialize(root) ⇒ App
constructor
A new instance of App.
- #rails_version ⇒ Object
Constructor Details
Instance Attribute Details
#root ⇒ Object (readonly)
Returns the value of attribute root.
7 8 9 |
# File 'lib/rails_finder/app.rb', line 7 def root @root end |
Instance Method Details
#basename ⇒ Object
13 14 15 |
# File 'lib/rails_finder/app.rb', line 13 def basename File.basename(root) end |
#rails_version ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rails_finder/app.rb', line 17 def rails_version if gemfile.exists? gemfile.rails_version elsif isofile.exists? isofile.rails_version elsif envfile.exists? envfile.rails_version else "n/a" end end |