Class: Clinical::Status
- Inherits:
-
Object
- Object
- Clinical::Status
- Defined in:
- lib/clinical/status.rb
Constant Summary collapse
- STATUSES =
[ :not_yet_recruiting, :recruiting, :enrolling_by_invitation, :active, :not_recruiting, :completed, :suspended, :terminated, :withdrawn, :available, :no_longer_available ]
- OPEN_STATUSES =
[ :not_yet_recruiting, :recruiting ]
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(sym) ⇒ Status
constructor
A new instance of Status.
- #open? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(sym) ⇒ Status
Returns a new instance of Status.
24 25 26 |
# File 'lib/clinical/status.rb', line 24 def initialize(sym) @name = sym end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
22 23 24 |
# File 'lib/clinical/status.rb', line 22 def name @name end |
Class Method Details
Instance Method Details
#open? ⇒ Boolean
28 29 30 |
# File 'lib/clinical/status.rb', line 28 def open? OPEN_STATUSES.include?(name) end |
#to_s ⇒ Object
32 33 34 |
# File 'lib/clinical/status.rb', line 32 def to_s @name.to_s end |