Class: LaneKit::Lanefile

Inherits:
Object
  • Object
show all
Defined in:
lib/lanekit/lanefile.rb

Instance Method Summary collapse

Constructor Details

#initializeLanefile

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.expand_path('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_nameObject



21
22
23
# File 'lib/lanekit/lanefile.rb', line 21

def app_project_name
  @contents['app_project_name']
end

#app_project_pathObject



25
26
27
# File 'lib/lanekit/lanefile.rb', line 25

def app_project_path
  @contents['app_project_path']
end

#app_target_nameObject



29
30
31
# File 'lib/lanekit/lanefile.rb', line 29

def app_target_name
  @contents['app_target_name']
end

#app_target_tests_nameObject



33
34
35
# File 'lib/lanekit/lanefile.rb', line 33

def app_target_tests_name
  @contents['app_target_tests_name']
end

#exists?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/lanekit/lanefile.rb', line 17

def exists?
  File.exists?(@lane_file)
end