Class: PublicActivity::Config::Block
- Inherits:
-
Object
- Object
- PublicActivity::Config::Block
- Defined in:
- lib/public_activity/config.rb
Overview
Provides simple DSL for the config block.
Instance Method Summary collapse
-
#enabled(value = nil) ⇒ Object
Decides whether to enable PublicActivity.
- #orm(orm = nil) ⇒ Object
-
#table_name(name = nil) ⇒ Object
Sets the table_name for the model.
Instance Method Details
#enabled(value = nil) ⇒ Object
Decides whether to enable PublicActivity.
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 |