Class: Sail::Types::Locales

Inherits:
Array show all
Defined in:
lib/sail/types/locales.rb

Overview

Locales

Locales settings will keep an array of locales. If the current I18n.locale is included in the array, the setting will return true.

Instance Method Summary collapse

Methods inherited from Array

#from

Methods inherited from Type

#from, #initialize

Constructor Details

This class inherits a constructor from Sail::Types::Type

Instance Method Details

#to_valueObject



11
12
13
14
15
# File 'lib/sail/types/locales.rb', line 11

def to_value
  @setting.value
          .split(Sail.configuration.array_separator)
          .include?(I18n.locale.to_s)
end