Class: Fastlane::Argument

Inherits:
Object
  • Object
show all
Defined in:
fastlane/lib/fastlane/server/action_command.rb

Overview

Represents an argument to the ActionCommand

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



22
23
24
# File 'fastlane/lib/fastlane/server/action_command.rb', line 22

def name
  @name
end

#valueObject (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_typeObject (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

#inspectObject



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_namedObject



10
11
12
# File 'fastlane/lib/fastlane/server/action_command.rb', line 10

def is_named
  return @name.to_s.length > 0
end