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.



201
202
203
204
205
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 201

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.



200
201
202
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 200

def default
  @default
end

#idObject (readonly)

Returns the value of attribute id.



200
201
202
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 200

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



200
201
202
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 200

def name
  @name
end

Instance Method Details

#default?Boolean

Returns:

  • (Boolean)


207
208
209
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 207

def default?
  default
end

#to_sObject



211
212
213
# File 'lib/phraseapp_updater/phraseapp_api.rb', line 211

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