Module: FactoryTrace::Helpers::Statusable

Included in:
Structures::Factory, Structures::Trait
Defined in:
lib/factory_trace/helpers/statusable.rb

Constant Summary collapse

PRIORITY_ORDER =
[:used, :indirectly_used, nil]

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#statusObject

Returns the value of attribute status.



8
9
10
# File 'lib/factory_trace/helpers/statusable.rb', line 8

def status
  @status
end

Instance Method Details

#has_prioritized_status?(status) ⇒ Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/factory_trace/helpers/statusable.rb', line 14

def has_prioritized_status?(status)
  PRIORITY_ORDER.index(@status) <= PRIORITY_ORDER.index(status)
end