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.



319
320
321
322
323
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 319

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.



318
319
320
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 318

def default
  @default
end

#idObject (readonly)

Returns the value of attribute id.



318
319
320
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 318

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



318
319
320
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 318

def name
  @name
end

Instance Method Details

#default?Boolean

Returns:

  • (Boolean)


325
326
327
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 325

def default?
  default
end

#to_sObject



329
330
331
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 329

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