Class: Adminterface::Data::Countries

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

Constant Summary collapse

PluginMissing =
Class.new(StandardError)

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

call

Constructor Details

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

Returns a new instance of Countries.



10
11
12
13
# File 'lib/adminterface/data/countries.rb', line 10

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

Instance Attribute Details

#localeObject (readonly)

Returns the value of attribute locale.



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

def locale
  @locale
end

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end

Instance Method Details

#callObject



15
16
17
18
# File 'lib/adminterface/data/countries.rb', line 15

def call
  raise_error if plugin_missing?
  countries
end