Module: INatGet::System::Context Private
- Included in:
- Data::DSL::Dataset, Data::Parser, Data::Updater
- Defined in:
- lib/inat-get/sys/context.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Attribute Summary collapse
- .shutdown ⇒ Boolean private
Class Method Summary collapse
-
.check_shutdown! { ... } ⇒ void
private
Check shutdown mode and interrupt execution if needed.
- .shutdown? ⇒ Boolean private
Instance Method Summary collapse
-
#check_shutdown! { ... } ⇒ void
private
private
Check shutdown mode and interrupt execution if needed.
- #shutdown? ⇒ Boolean private private
Class Attribute Details
.shutdown ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 |
# File 'lib/inat-get/sys/context.rb', line 14 def shutdown= value @@context_shutdown = value end |
Class Method Details
.check_shutdown! { ... } ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Check shutdown mode and interrupt execution if needed
If #shutdown? — execute block if given, than exit with Errno::EINTR::Errno code.
35 36 37 38 39 40 |
# File 'lib/inat-get/sys/context.rb', line 35 def check_shutdown! if shutdown? yield if block_given? exit(Errno::EINTR::Errno) end end |
.shutdown? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 28 |
# File 'lib/inat-get/sys/context.rb', line 25 def shutdown? @@context_shutdown ||= false !!@@context_shutdown end |
Instance Method Details
#check_shutdown! { ... } ⇒ void (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Check shutdown mode and interrupt execution if needed
If #shutdown? — execute block if given, than exit with Errno::EINTR::Errno code.
35 36 37 38 39 40 |
# File 'lib/inat-get/sys/context.rb', line 35 def check_shutdown! if shutdown? yield if block_given? exit(Errno::EINTR::Errno) end end |
#shutdown? ⇒ Boolean (private)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
25 26 27 28 |
# File 'lib/inat-get/sys/context.rb', line 25 def shutdown? @@context_shutdown ||= false !!@@context_shutdown end |