Class: Fuey::Inspections::Inspection
- Inherits:
-
Object
- Object
- Fuey::Inspections::Inspection
- Includes:
- ModelInitializer, Observable
- Defined in:
- lib/fuey_client/fuey/inspections/inspection.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
Methods included from ModelInitializer
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
11 12 13 |
# File 'lib/fuey_client/fuey/inspections/inspection.rb', line 11 def name @name end |
#state ⇒ Object
Returns the value of attribute state.
11 12 13 |
# File 'lib/fuey_client/fuey/inspections/inspection.rb', line 11 def state @state end |
Instance Method Details
#failed? ⇒ Boolean
31 32 33 |
# File 'lib/fuey_client/fuey/inspections/inspection.rb', line 31 def failed? state == 'failed' end |
#notify ⇒ Object
35 36 37 38 |
# File 'lib/fuey_client/fuey/inspections/inspection.rb', line 35 def notify changed notify_observers status end |
#passed? ⇒ Boolean
27 28 29 |
# File 'lib/fuey_client/fuey/inspections/inspection.rb', line 27 def passed? state == 'passed' end |
#status ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/fuey_client/fuey/inspections/inspection.rb', line 40 def status { :type => self.class.to_s.split('::').last, :name => name, :status => self.state } end |