Module: Kernel
- Defined in:
- lib/developwithpassion_expander/kernel.rb
Instance Method Summary collapse
- #delayed ⇒ Object
- #disable_logging ⇒ Object
- #dynamic ⇒ Object
- #enable_logging ⇒ Object
- #expand(title = "Expansion", &block) ⇒ Object
- #glob(path) ⇒ Object
- #log(message) ⇒ Object
Instance Method Details
#delayed ⇒ Object
20 21 22 23 24 |
# File 'lib/developwithpassion_expander/kernel.rb', line 20 def delayed Configatron::Delayed.new do yield end end |
#disable_logging ⇒ Object
12 13 14 |
# File 'lib/developwithpassion_expander/kernel.rb', line 12 def disable_logging DevelopWithPassion::Expander::Log.disable end |
#dynamic ⇒ Object
26 27 28 29 30 |
# File 'lib/developwithpassion_expander/kernel.rb', line 26 def dynamic Configatron::Dynamic.new do yield end end |
#enable_logging ⇒ Object
16 17 18 |
# File 'lib/developwithpassion_expander/kernel.rb', line 16 def enable_logging DevelopWithPassion::Expander::Log.enable end |
#expand(title = "Expansion", &block) ⇒ Object
2 3 4 |
# File 'lib/developwithpassion_expander/kernel.rb', line 2 def (title = "Expansion",&block) DevelopWithPassion::Expander::Expansion.instance.instance_eval(&block) end |
#glob(path) ⇒ Object
6 7 8 9 10 |
# File 'lib/developwithpassion_expander/kernel.rb', line 6 def glob(path) items = Dir.glob(path,File::FNM_DOTMATCH) items.each{|item| yield item if block_given?} return items end |
#log(message) ⇒ Object
32 33 34 |
# File 'lib/developwithpassion_expander/kernel.rb', line 32 def log() DevelopWithPassion::Expander::Log.() end |