Module: Kernel

Defined in:
lib/developwithpassion_expander/kernel.rb

Instance Method Summary collapse

Instance Method Details

#delayedObject



20
21
22
23
24
# File 'lib/developwithpassion_expander/kernel.rb', line 20

def delayed
  Configatron::Delayed.new do
    yield
  end
end

#disable_loggingObject



12
13
14
# File 'lib/developwithpassion_expander/kernel.rb', line 12

def disable_logging
  DevelopWithPassion::Expander::Log.disable
end

#dynamicObject



26
27
28
29
30
# File 'lib/developwithpassion_expander/kernel.rb', line 26

def dynamic
  Configatron::Dynamic.new do
    yield
  end
end

#enable_loggingObject



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 expand(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(message)
  DevelopWithPassion::Expander::Log.message(message)
end