Module: Yasm::State
- Defined in:
- lib/yasm/state.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#instantiated_at ⇒ Object
Returns the value of attribute instantiated_at.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#instantiated_at ⇒ Object
Returns the value of attribute instantiated_at.
57 58 59 |
# File 'lib/yasm/state.rb', line 57 def instantiated_at @instantiated_at end |
Class Method Details
.included(base) ⇒ Object
3 4 5 |
# File 'lib/yasm/state.rb', line 3 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#passed_maximum_time_limit? ⇒ Boolean
68 69 70 71 |
# File 'lib/yasm/state.rb', line 68 def passed_maximum_time_limit? return false unless self.class.maximum_duration (Time.now - instantiated_at) >= self.class.maximum_duration end |
#reached_minimum_time_limit? ⇒ Boolean
63 64 65 66 |
# File 'lib/yasm/state.rb', line 63 def reached_minimum_time_limit? return true unless self.class.minimum_duration (Time.now - instantiated_at) >= self.class.minimum_duration end |
#to_s ⇒ Object
59 60 61 |
# File 'lib/yasm/state.rb', line 59 def to_s self.class.to_s end |