Class: PhraseAppUpdater::PhraseAppAPI::Locale

Inherits:
Object
  • Object
show all
Defined in:
lib/phraseapp_updater/phraseapp_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(phraseapp_locale) ⇒ Locale

Returns a new instance of Locale.



159
160
161
162
163
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 159

def initialize(phraseapp_locale)
  @name    = phraseapp_locale.name
  @id      = phraseapp_locale.id
  @default = phraseapp_locale.default
end

Instance Attribute Details

#defaultObject (readonly)

Returns the value of attribute default.



158
159
160
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 158

def default
  @default
end

#idObject (readonly)

Returns the value of attribute id.



158
159
160
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 158

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



158
159
160
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 158

def name
  @name
end

Instance Method Details

#default?Boolean

Returns:

  • (Boolean)


165
166
167
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 165

def default?
  default
end

#to_sObject



169
170
171
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 169

def to_s
  "#{name} : #{id}"
end