Class: Conveyor::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/conveyor/status.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path = nil) ⇒ Status

Returns a new instance of Status.



7
8
9
# File 'lib/conveyor/status.rb', line 7

def initialize(path = nil)
  reset!(path)
end

Instance Attribute Details

#errorsObject

Returns the value of attribute errors.



4
5
6
# File 'lib/conveyor/status.rb', line 4

def errors
  @errors
end

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/conveyor/status.rb', line 5

def path
  @path
end

#successObject (readonly)

Returns the value of attribute success.



3
4
5
# File 'lib/conveyor/status.rb', line 3

def success
  @success
end

Instance Method Details

#fail!(v = false) ⇒ Object



17
18
19
# File 'lib/conveyor/status.rb', line 17

def fail!(v = false)
  @success &= v
end

#reset!(path = nil) ⇒ Object



11
12
13
14
15
# File 'lib/conveyor/status.rb', line 11

def reset!(path = nil)
  @path = path
  @success = true
  @errors = []
end

#success!(v = true) ⇒ Object



21
22
23
# File 'lib/conveyor/status.rb', line 21

def success!(v=true)
  @success &= v
end

#success?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/conveyor/status.rb', line 25

def success?
  @success
end