class Doconomy::Api::Language

Attributes

code[RW]

Public Class Methods

all() click to toggle source

Returns all languages

@return [Array<Doconomy::Api::Language>]

# File lib/doconomy/api/language.rb, line 18
def all
  response = client.get("/aland-index/#{Doconomy::Api.configuration.api_version}/languages")
  response[:languages].map { |attributes| new(attributes) }
end
new(attributes = {}) click to toggle source
# File lib/doconomy/api/language.rb, line 8
def initialize(attributes = {})
  @attributes = attributes.deep_symbolize_keys
  @code = @attributes[:code]
end