Module: Creepin
- Defined in:
- lib/creepin.rb,
lib/creepin/on.rb,
lib/creepin/version.rb,
lib/creepin/resource.rb,
lib/creepin/collection.rb,
lib/creepin/resource_creeper.rb,
lib/creepin/collection_creeper.rb
Defined Under Namespace
Classes: Collection, CollectionCreeper, On, Resource, ResourceCreeper
Constant Summary
collapse
- VERSION =
"0.0.1"
- @@loaded =
false
Class Method Summary
collapse
Class Method Details
.files_in_load_path ⇒ Object
41
42
43
|
# File 'lib/creepin.rb', line 41
def self.files_in_load_path
load_paths.flatten.compact.uniq.collect{|path| Dir["#{path}/**/*.rb"] }.flatten
end
|
.load! ⇒ Object
24
25
26
27
28
29
30
31
|
# File 'lib/creepin.rb', line 24
def self.load!
return false if loaded?
files_in_load_path.each{|file| load file }
@@loaded = true
end
|
.load_paths ⇒ Object
37
38
39
|
# File 'lib/creepin.rb', line 37
def self.load_paths
[File.expand_path('app/creepers', Rails.root)]
end
|
.loaded? ⇒ Boolean
33
34
35
|
# File 'lib/creepin.rb', line 33
def self.loaded?
@@loaded
end
|
.setup(&block) ⇒ Object
19
20
21
22
|
# File 'lib/creepin.rb', line 19
def self.setup(&block)
load!
instance_eval(&block)
end
|