Class: Ransack::Nodes::Node
- Inherits:
-
Object
- Object
- Ransack::Nodes::Node
- Defined in:
- lib/ransack/nodes/node.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(context) ⇒ Node
constructor
A new instance of Node.
- #translate(key, options = {}) ⇒ Object
Constructor Details
#initialize(context) ⇒ Node
Returns a new instance of Node.
21 22 23 |
# File 'lib/ransack/nodes/node.rb', line 21 def initialize(context) @context = context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
4 5 6 |
# File 'lib/ransack/nodes/node.rb', line 4 def context @context end |
Class Method Details
.i18n_alias(opts = {}) ⇒ Object
16 17 18 |
# File 'lib/ransack/nodes/node.rb', line 16 def i18n_alias(opts = {}) self.i18n_aliases.merge! Hash[opts.map { |k, v| [k.to_s, v.to_s] }] end |
.i18n_word(*args) ⇒ Object
12 13 14 |
# File 'lib/ransack/nodes/node.rb', line 12 def i18n_word(*args) self.i18n_words += args.map(&:to_s) end |