Sha256: 5d8120ec79cda85ad56c3616cdde049f5b5c46208683ca22131240c221b88d7a

Contents?: true

Size: 845 Bytes

Versions: 1

Compression:

Stored size: 845 Bytes

Contents

module Fastlane
  # Represents a lane
  class Lane
    attr_accessor :platform

    attr_accessor :name

    # @return (Array) An array containing the description of this lane
    #   Each item of the array is one line
    attr_accessor :description

    attr_accessor :block

    def initialize(platform: nil, name: nil, description: nil, block: nil)
      raise "description must be an array" unless description.kind_of?Array
      
      self.platform = platform
      self.name = name
      self.description = description
      self.block = block
    end

    # Execute this lane
    def call(parameters)
      block.call(parameters || {})
    end

    # @return [String] The lane + name of the lane. If there is no platform, it will only be the lane name
    def pretty_name
      [platform, name].reject(&:nil?).join(' ')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fastlane-1.9.0 lib/fastlane/lane.rb