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.
-
#is_private ⇒ Boolean
Is that a private lane that can’t be called from the CLI?.
-
#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, is_private: false) ⇒ 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, is_private: false) ⇒ Lane
Returns a new instance of Lane.
17 18 19 20 21 22 23 24 25 |
# File 'lib/fastlane/lane.rb', line 17 def initialize(platform: nil, name: nil, description: nil, block: nil, is_private: false) raise "description must be an array" unless description.kind_of?Array self.platform = platform self.name = name self.description = description self.block = block self.is_private = is_private 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 |
#is_private ⇒ Boolean
Returns Is that a private lane that can’t be called from the CLI?.
15 16 17 |
# File 'lib/fastlane/lane.rb', line 15 def is_private @is_private 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
28 29 30 |
# File 'lib/fastlane/lane.rb', line 28 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.
33 34 35 |
# File 'lib/fastlane/lane.rb', line 33 def pretty_name [platform, name].reject(&:nil?).join(' ') end |