Class: XcodeBuild::BuildStep

Inherits:
Object
  • Object
show all
Defined in:
lib/xcode_build/build_step.rb

Defined Under Namespace

Classes: Error

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metadata) ⇒ BuildStep

Returns a new instance of BuildStep.



8
9
10
11
# File 'lib/xcode_build/build_step.rb', line 8

def initialize()
  @metadata = 
  @errors = []
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



6
7
8
# File 'lib/xcode_build/build_step.rb', line 6

def errors
  @errors
end

#failedObject

Returns the value of attribute failed.



5
6
7
# File 'lib/xcode_build/build_step.rb', line 5

def failed
  @failed
end

Instance Method Details

#==(other_action) ⇒ Object



22
23
24
25
# File 'lib/xcode_build/build_step.rb', line 22

def ==(other_action)
  (other_action.type == type &&
   other_action.arguments == arguments)
end

#add_error(params) ⇒ Object



13
14
15
16
# File 'lib/xcode_build/build_step.rb', line 13

def add_error(params)
  @failed = true
  @errors << Error.new(params)
end

#argumentsObject



31
32
33
# File 'lib/xcode_build/build_step.rb', line 31

def arguments
  @metadata[:arguments]
end

#failed?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/xcode_build/build_step.rb', line 35

def failed?
  @failed
end

#has_errors?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/xcode_build/build_step.rb', line 18

def has_errors?
  @errors.any?
end

#inspectObject



39
40
41
# File 'lib/xcode_build/build_step.rb', line 39

def inspect
  [type, arguments]
end

#typeObject



27
28
29
# File 'lib/xcode_build/build_step.rb', line 27

def type
  @metadata[:type]
end