Class: Fastlane::Lane
- Inherits:
-
Object
- Object
- Fastlane::Lane
- Defined in:
- lib/fastlane/lane.rb
Overview
Represents a lane
Instance Attribute Summary collapse
-
#block ⇒ Object
Returns the value of attribute block.
-
#description ⇒ Array
An array containing the description of this lane Each item of the array is one line.
-
#name ⇒ Object
Returns the value of attribute name.
-
#platform ⇒ Object
Returns the value of attribute platform.
Instance Method Summary collapse
-
#call(parameters) ⇒ Object
Execute this lane.
-
#initialize(platform: nil, name: nil, description: nil, block: nil) ⇒ Lane
constructor
A new instance of Lane.
-
#pretty_name ⇒ String
The lane + name of the lane.
Constructor Details
#initialize(platform: nil, name: nil, description: nil, block: nil) ⇒ Lane
Returns a new instance of Lane.
14 15 16 17 18 19 20 21 |
# File 'lib/fastlane/lane.rb', line 14 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 |
Instance Attribute Details
#block ⇒ Object
Returns the value of attribute block.
12 13 14 |
# File 'lib/fastlane/lane.rb', line 12 def block @block end |
#description ⇒ Array
Returns An array containing the description of this lane Each item of the array is one line.
10 11 12 |
# File 'lib/fastlane/lane.rb', line 10 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/fastlane/lane.rb', line 6 def name @name end |
#platform ⇒ Object
Returns the value of attribute platform.
4 5 6 |
# File 'lib/fastlane/lane.rb', line 4 def platform @platform end |
Instance Method Details
#call(parameters) ⇒ Object
Execute this lane
24 25 26 |
# File 'lib/fastlane/lane.rb', line 24 def call(parameters) block.call(parameters || {}) end |
#pretty_name ⇒ String
Returns The lane + name of the lane. If there is no platform, it will only be the lane name.
29 30 31 |
# File 'lib/fastlane/lane.rb', line 29 def pretty_name [platform, name].reject(&:nil?).join(' ') end |