Class: Datacaster::I18nValues::Base
- Inherits:
-
Object
- Object
- Datacaster::I18nValues::Base
- Defined in:
- lib/datacaster/i18n_values/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
Instance Method Summary collapse
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
4 5 6 |
# File 'lib/datacaster/i18n_values/base.rb', line 4 def args @args end |
Instance Method Details
#*(other, additional_scope = []) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/datacaster/i18n_values/base.rb', line 6 def *(other, additional_scope = []) # To allow redefine array/hash errors with #i18n_key other = other.first if other.is_a?(Array) && other.length == 1 result = apply(other, additional_scope) result = [result] unless result.is_a?(Array) || result.is_a?(Hash) result end |
#==(other) ⇒ Object
15 16 17 |
# File 'lib/datacaster/i18n_values/base.rb', line 15 def ==(other) self.class == other.class && @args == other.args end |