Class: Fastlane::Argument
- Inherits:
-
Object
- Object
- Fastlane::Argument
- Defined in:
- fastlane/lib/fastlane/server/action_command.rb
Overview
Represents an argument to the ActionCommand
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
-
#value_type ⇒ Object
readonly
Returns the value of attribute value_type.
Instance Method Summary collapse
-
#initialize(json: nil) ⇒ Argument
constructor
A new instance of Argument.
- #inspect ⇒ Object
- #is_named ⇒ Object
Constructor Details
#initialize(json: nil) ⇒ Argument
Returns a new instance of Argument.
4 5 6 7 8 |
# File 'fastlane/lib/fastlane/server/action_command.rb', line 4 def initialize(json: nil) @name = json['name'] @value = json['value'] @value_type = json['value_type'] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
22 23 24 |
# File 'fastlane/lib/fastlane/server/action_command.rb', line 22 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
23 24 25 |
# File 'fastlane/lib/fastlane/server/action_command.rb', line 23 def value @value end |
#value_type ⇒ Object (readonly)
Returns the value of attribute value_type.
24 25 26 |
# File 'fastlane/lib/fastlane/server/action_command.rb', line 24 def value_type @value_type end |
Instance Method Details
#inspect ⇒ Object
14 15 16 17 18 19 20 |
# File 'fastlane/lib/fastlane/server/action_command.rb', line 14 def inspect if is_named return "named argument: #{name}, value: #{value}, type: #{value_type}" else return "unnamed argument value: #{value}, type: #{value_type}" end end |
#is_named ⇒ Object
10 11 12 |
# File 'fastlane/lib/fastlane/server/action_command.rb', line 10 def is_named return @name.to_s.length > 0 end |