Class: Adminterface::Data::TimeZones

Inherits:
Base
  • Object
show all
Defined in:
lib/adminterface/data/time_zones.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

call

Constructor Details

#initialize(locale, options = {}) ⇒ TimeZones

Returns a new instance of TimeZones.



8
9
10
11
# File 'lib/adminterface/data/time_zones.rb', line 8

def initialize(locale, options = {})
  @locale = locale
  @options = options
end

Instance Attribute Details

#localeObject (readonly)

Returns the value of attribute locale.



6
7
8
# File 'lib/adminterface/data/time_zones.rb', line 6

def locale
  @locale
end

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/adminterface/data/time_zones.rb', line 6

def options
  @options
end

Instance Method Details

#callObject



13
14
15
# File 'lib/adminterface/data/time_zones.rb', line 13

def call
  I18n.with_locale(locale) { time_zones }
end