Class: MongoMapper::Migration::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/mongo_mapper_ext/migration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enabled = true) ⇒ Logger

Returns a new instance of Logger.



25
26
27
# File 'lib/mongo_mapper_ext/migration.rb', line 25

def initialize enabled = true
  self.enabled = enabled
end

Instance Attribute Details

#enabledObject

Returns the value of attribute enabled.



23
24
25
# File 'lib/mongo_mapper_ext/migration.rb', line 23

def enabled
  @enabled
end

Instance Method Details

#info(message) ⇒ Object



29
30
31
# File 'lib/mongo_mapper_ext/migration.rb', line 29

def info message
  puts message if enabled
end