Class: LaneKit::Lanefile
- Inherits:
-
Object
- Object
- LaneKit::Lanefile
- Defined in:
- lib/lanekit/lanefile.rb
Instance Method Summary collapse
- #app_project_name ⇒ Object
- #app_project_path ⇒ Object
- #app_target_name ⇒ Object
- #app_target_tests_name ⇒ Object
- #exists? ⇒ Boolean
-
#initialize ⇒ Lanefile
constructor
A new instance of Lanefile.
Constructor Details
#initialize ⇒ Lanefile
Returns a new instance of Lanefile.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/lanekit/lanefile.rb', line 5 def initialize @lane_file = File.('Lanefile') if self.exists? @contents = load_file if !File.exists?(self.app_project_path) say "Error: cannot find project: #{self.app_project_path}", :red end end end |
Instance Method Details
#app_project_name ⇒ Object
21 22 23 |
# File 'lib/lanekit/lanefile.rb', line 21 def app_project_name @contents['app_project_name'] end |
#app_project_path ⇒ Object
25 26 27 |
# File 'lib/lanekit/lanefile.rb', line 25 def app_project_path @contents['app_project_path'] end |
#app_target_name ⇒ Object
29 30 31 |
# File 'lib/lanekit/lanefile.rb', line 29 def app_target_name @contents['app_target_name'] end |
#app_target_tests_name ⇒ Object
33 34 35 |
# File 'lib/lanekit/lanefile.rb', line 33 def app_target_tests_name @contents['app_target_tests_name'] end |
#exists? ⇒ Boolean
17 18 19 |
# File 'lib/lanekit/lanefile.rb', line 17 def exists? File.exists?(@lane_file) end |