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

Instance Method Details

#load!Object

Loads tablets files.



17
18
19
20
# File 'lib/tablets/global/loader.rb', line 17

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.

Returns:

  • (Boolean)


12
13
14
# File 'lib/tablets/global/loader.rb', line 12

def loaded?
  !@tablets.nil?
end

#unload!Object

Unloads tablet.



6
7
8
# File 'lib/tablets/global/loader.rb', line 6

def unload!
  @tablets = nil
end