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(en = nil) ⇒ Object

Decides whether to enable PublicActivity.

Parameters:

  • en (Boolean) (defaults to: nil)

    Enabled?


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

def enabled(en = nil)
  @enabled = (en.nil? ? @enabled : en)
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


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

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