Class: Ein::Console

Inherits:
Object
  • Object
show all
Defined in:
lib/ein/console.rb

Instance Method Summary collapse

Constructor Details

#initialize(level = :info) ⇒ Console

Returns a new instance of Console.



9
10
11
12
13
14
15
# File 'lib/ein/console.rb', line 9

def initialize(level=:info)
  if available?(level)
    @level = level
  else
    @level = :info
  end
end

Instance Method Details

#debug(text) ⇒ Object



21
22
23
# File 'lib/ein/console.rb', line 21

def debug(text)
  puts(text) if should_print(:debug)
end

#info(text) ⇒ Object



17
18
19
# File 'lib/ein/console.rb', line 17

def info(text)
  puts(text) if should_print(:info)
end