class Toptranslation::Resource::StringList
Public Class Methods
new(connection, options = {})
click to toggle source
# File lib/toptranslation/resource/string_list.rb, line 5 def initialize(connection, options = {}) @connection = connection @options = options end
Public Instance Methods
create(options = {})
click to toggle source
# File lib/toptranslation/resource/string_list.rb, line 19 def create(options = {}) project_identifier = options['project_identifier'] || @options[:project_identifier] document_identifier = options['document_identifier'] || @options[:document_identifier] String.new(@connection, options.merge('project_identifier' => project_identifier, 'document_identifier' => document_identifier)) end
each() { |string| ... }
click to toggle source
# File lib/toptranslation/resource/string_list.rb, line 15 def each strings.each { |string| yield String.new(@connection, string) } end
find(identifier)
click to toggle source
# File lib/toptranslation/resource/string_list.rb, line 10 def find(identifier) result = @connection.get("/strings/#{identifier}") Document.new(@connection, result) end
Private Instance Methods
strings()
click to toggle source
# File lib/toptranslation/resource/string_list.rb, line 28 def strings @connection.get('/strings', params: { project_identifier: @options[:project_identifier], document_identifier: @options[:document_identifier] }) end