Class: TripAdvisor::Translation::Localization

Inherits:
Object
  • Object
show all
Defined in:
lib/trip_advisor/translation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Localization

Returns a new instance of Localization.



23
24
25
# File 'lib/trip_advisor/translation.rb', line 23

def initialize(attributes = {})
  attributes.each { |k, v| self.send("#{k}=", v) }
end

Instance Attribute Details

#language_nameObject

Returns the value of attribute language_name.



21
22
23
# File 'lib/trip_advisor/translation.rb', line 21

def language_name
  @language_name
end

#locale_identifierObject

Returns the value of attribute locale_identifier.



21
22
23
# File 'lib/trip_advisor/translation.rb', line 21

def locale_identifier
  @locale_identifier
end

#statusObject

Returns the value of attribute status.



21
22
23
# File 'lib/trip_advisor/translation.rb', line 21

def status
  @status
end

#stringObject

Returns the value of attribute string.



21
22
23
# File 'lib/trip_advisor/translation.rb', line 21

def string
  @string
end

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/trip_advisor/translation.rb', line 39

def active?
  status == 'Active'
end

#to_sObject



35
36
37
# File 'lib/trip_advisor/translation.rb', line 35

def to_s
  string
end