Class: State

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#file_contentsObject

Returns the value of attribute file_contents.



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

def file_contents
  @file_contents
end

#filesObject

Returns the value of attribute files.



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

def files
  @files
end

#resultObject

Returns the value of attribute result.



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

def result
  @result
end

#return_codeObject

Returns the value of attribute return_code.



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

def return_code
  @return_code
end

#timeObject

Returns the value of attribute time.



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

def time
  @time
end

Instance Method Details

#green?Boolean

Returns:

  • (Boolean)


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

def green?
	@return_code == 0
end

#red?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/state.rb', line 9

def red?
	not green?
end