Class: Maglev::Site::Locale

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
app/models/maglev/site/locale.rb

Overview

rubocop:disable Style/ClassAndModuleChildren

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#labelObject

validations ##



9
10
11
# File 'app/models/maglev/site/locale.rb', line 9

def label
  @label
end

#prefixObject

attributes ##



9
10
11
# File 'app/models/maglev/site/locale.rb', line 9

def prefix
  @prefix
end

Instance Method Details

#as_json(_options = nil) ⇒ Object

methods ##



15
16
17
# File 'app/models/maglev/site/locale.rb', line 15

def as_json(_options = nil)
  { label: label, prefix: prefix }
end