Class: Ransack::Name
- Inherits:
-
String
- Object
- String
- Ransack::Name
- Defined in:
- lib/ransack/naming.rb
Instance Attribute Summary collapse
-
#collection ⇒ Object
(also: #cache_key)
readonly
Returns the value of attribute collection.
-
#element ⇒ Object
readonly
Returns the value of attribute element.
-
#human ⇒ Object
readonly
Returns the value of attribute human.
-
#i18n_key ⇒ Object
readonly
Returns the value of attribute i18n_key.
-
#param_key ⇒ Object
readonly
Returns the value of attribute param_key.
-
#partial_path ⇒ Object
readonly
Returns the value of attribute partial_path.
-
#plural ⇒ Object
readonly
Returns the value of attribute plural.
-
#route_key ⇒ Object
readonly
Returns the value of attribute route_key.
-
#singular ⇒ Object
readonly
Returns the value of attribute singular.
Instance Method Summary collapse
-
#initialize ⇒ Name
constructor
A new instance of Name.
Constructor Details
#initialize ⇒ Name
Returns a new instance of Name.
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/ransack/naming.rb', line 34 def initialize super(Constants::CAP_SEARCH) @singular = Constants::SEARCH @plural = Constants::SEARCHES @element = Constants::SEARCH @human = Constants::CAP_SEARCH @collection = Constants::RANSACK_SLASH_SEARCHES @partial_path = Constants::RANSACK_SLASH_SEARCHES_SLASH_SEARCH @param_key = Constants::Q @route_key = Constants::SEARCHES @i18n_key = :ransack end |
Instance Attribute Details
#collection ⇒ Object (readonly) Also known as: cache_key
Returns the value of attribute collection.
30 31 32 |
# File 'lib/ransack/naming.rb', line 30 def collection @collection end |
#element ⇒ Object (readonly)
Returns the value of attribute element.
30 31 32 |
# File 'lib/ransack/naming.rb', line 30 def element @element end |
#human ⇒ Object (readonly)
Returns the value of attribute human.
30 31 32 |
# File 'lib/ransack/naming.rb', line 30 def human @human end |
#i18n_key ⇒ Object (readonly)
Returns the value of attribute i18n_key.
30 31 32 |
# File 'lib/ransack/naming.rb', line 30 def i18n_key @i18n_key end |
#param_key ⇒ Object (readonly)
Returns the value of attribute param_key.
30 31 32 |
# File 'lib/ransack/naming.rb', line 30 def param_key @param_key end |
#partial_path ⇒ Object (readonly)
Returns the value of attribute partial_path.
30 31 32 |
# File 'lib/ransack/naming.rb', line 30 def partial_path @partial_path end |
#plural ⇒ Object (readonly)
Returns the value of attribute plural.
30 31 32 |
# File 'lib/ransack/naming.rb', line 30 def plural @plural end |
#route_key ⇒ Object (readonly)
Returns the value of attribute route_key.
30 31 32 |
# File 'lib/ransack/naming.rb', line 30 def route_key @route_key end |
#singular ⇒ Object (readonly)
Returns the value of attribute singular.
30 31 32 |
# File 'lib/ransack/naming.rb', line 30 def singular @singular end |