Class: AliveState::Application
- Inherits:
-
Object
- Object
- AliveState::Application
- Defined in:
- lib/alive_state/application.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #alive? ⇒ Boolean
-
#initialize(name, &block) ⇒ Application
constructor
A new instance of Application.
Constructor Details
#initialize(name, &block) ⇒ Application
Returns a new instance of Application.
5 6 7 8 |
# File 'lib/alive_state/application.rb', line 5 def initialize(name, &block) @name = name @block = block end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/alive_state/application.rb', line 3 def name @name end |
Instance Method Details
#alive? ⇒ Boolean
10 11 12 13 14 15 16 |
# File 'lib/alive_state/application.rb', line 10 def alive? @block.call rescue false else true end |