Module: Tablets::Global::Loader
- Included in:
- Tablets
- Defined in:
- lib/tablets/global/loader.rb
Overview
Tablets loader Manages files loading from app tablets directory
Instance Method Summary collapse
-
#load! ⇒ Object
Loads tablets files.
-
#loaded? ⇒ Boolean
Checks if tablet is loading Tablets is not loaded only if tablets is nil.
-
#unload! ⇒ Object
Unloads tablet.
Instance Method Details
#load! ⇒ Object
Loads tablets files
18 19 20 21 |
# File 'lib/tablets/global/loader.rb', line 18 def load! @tablets = {} files.each { |file| load file } end |
#loaded? ⇒ Boolean
Checks if tablet is loading Tablets is not loaded only if tablets is nil
13 14 15 |
# File 'lib/tablets/global/loader.rb', line 13 def loaded? !@tablets.nil? end |
#unload! ⇒ Object
Unloads tablet
7 8 9 |
# File 'lib/tablets/global/loader.rb', line 7 def unload! @tablets = nil end |