Method: Fastlane::FastFile#lane

Defined in:
fastlane/lib/fastlane/fast_file.rb

#lane(lane_name, &block) ⇒ Object

User defines a new lane



83
84
85
86
87
88
89
90
91
92
93
# File 'fastlane/lib/fastlane/fast_file.rb', line 83

def lane(lane_name, &block)
  UI.user_error!("You have to pass a block using 'do' for lane '#{lane_name}'. Make sure you read the docs on GitHub.") unless block

  self.runner.add_lane(Lane.new(platform: self.current_platform,
                                   block: block,
                             description: desc_collection,
                                    name: lane_name,
                              is_private: false))

  @desc_collection = nil # reset the collected description again for the next lane
end