Class: Desk::Api::Translations

Inherits:
Object
  • Object
show all
Includes:
Creatable, Listable
Defined in:
lib/desk/api/translations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Creatable

#create, #update

Methods included from Listable

#all, #show

Constructor Details

#initialize(connection, parent) ⇒ Translations

Returns a new instance of Translations.

Raises:

  • (ArgumentError)


14
15
16
17
18
19
20
# File 'lib/desk/api/translations.rb', line 14

def initialize(connection, parent)
  @connection = connection
  raise ArgumentError unless parent
  @parent = parent
  @endpoint = "#{parent.endpoint}/translations"
  @return_class = Desk::Translation
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



12
13
14
# File 'lib/desk/api/translations.rb', line 12

def connection
  @connection
end

#endpointObject (readonly)

Returns the value of attribute endpoint.



12
13
14
# File 'lib/desk/api/translations.rb', line 12

def endpoint
  @endpoint
end

#return_classObject (readonly)

Returns the value of attribute return_class.



12
13
14
# File 'lib/desk/api/translations.rb', line 12

def return_class
  @return_class
end