Class: PublicActivity::Config::Block

Inherits:
Object
  • Object
show all
Defined in:
lib/public_activity/config.rb

Overview

Provides simple DSL for the config block.

Instance Method Summary collapse

Instance Method Details

#enabled(value = nil) ⇒ Object

Decides whether to enable PublicActivity.

Parameters:

  • en (Boolean)

    Enabled?



91
92
93
# File 'lib/public_activity/config.rb', line 91

def enabled(value = nil)
  @enabled = (value.nil? ? @enabled : value)
end

#orm(orm = nil) ⇒ Object



85
86
87
# File 'lib/public_activity/config.rb', line 85

def orm(orm = nil)
  @orm = (orm ? orm.to_sym : false) || @orm
end

#table_name(name = nil) ⇒ Object

Sets the table_name for the model



96
97
98
# File 'lib/public_activity/config.rb', line 96

def table_name(name = nil)
  @table_name = (name.nil? ? @table_name : name)
end