Class: OhMyLog::Log::Selector
- Inherits:
-
Object
- Object
- OhMyLog::Log::Selector
- Defined in:
- lib/oh_my_log/selector.rb
Overview
Selector is a set of rule that Log.loggable? will have to respect
Constant Summary collapse
- METHODS =
["GET", "HEAD", "POST", "PATCH", "PUT", "DELETE"].freeze
- ACTIONS =
["ONLY", "EXCEPT", "ALL"].freeze
Instance Attribute Summary collapse
-
#actions ⇒ Object
readonly
Returns the value of attribute actions.
-
#controllers ⇒ Object
readonly
Returns the value of attribute controllers.
-
#ips ⇒ Object
readonly
Returns the value of attribute ips.
-
#status_codes ⇒ Object
readonly
Returns the value of attribute status_codes.
Instance Method Summary collapse
-
#initialize(controllers: default_hash_setting, actions: default_hash_setting, ips: default_hash_setting, status_codes: default_hash_setting) ⇒ Selector
constructor
TODO: add methods in the same style as anything else and it will affect the parameter method in the loggable function in LOG.rb EXCEPT O ONLY.
Constructor Details
#initialize(controllers: default_hash_setting, actions: default_hash_setting, ips: default_hash_setting, status_codes: default_hash_setting) ⇒ Selector
TODO: add methods in the same style as anything else and it will affect the parameter method in the loggable function in LOG.rb EXCEPT O ONLY
11 12 13 14 15 16 17 |
# File 'lib/oh_my_log/selector.rb', line 11 def initialize(controllers: default_hash_setting, actions: default_hash_setting, ips: default_hash_setting, status_codes: default_hash_setting) @controllers = controllers @actions = actions @ips = ips @status_codes = status_codes build_attr_setters end |
Instance Attribute Details
#actions ⇒ Object (readonly)
Returns the value of attribute actions.
5 6 7 |
# File 'lib/oh_my_log/selector.rb', line 5 def actions @actions end |
#controllers ⇒ Object (readonly)
Returns the value of attribute controllers.
5 6 7 |
# File 'lib/oh_my_log/selector.rb', line 5 def controllers @controllers end |
#ips ⇒ Object (readonly)
Returns the value of attribute ips.
5 6 7 |
# File 'lib/oh_my_log/selector.rb', line 5 def ips @ips end |
#status_codes ⇒ Object (readonly)
Returns the value of attribute status_codes.
5 6 7 |
# File 'lib/oh_my_log/selector.rb', line 5 def status_codes @status_codes end |