Sha256: fd5183525096e287aafa1b7a276a161fef6d41474df804523b485844324a874d

Contents?: true

Size: 346 Bytes

Versions: 2

Compression:

Stored size: 346 Bytes

Contents

module GoogleWebTranslate
  # @private
  SERVER_ATTRIBUTES = %i[host ip resolved_at last_used_at
                         counter available].freeze

  Server = Struct.new(*SERVER_ATTRIBUTES) do
    def to_json(*args)
      result = {}
      each_pair { |key, value| result[key] = value }
      result.to_json(args)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
google_web_translate-0.2.5 lib/google_web_translate/server.rb
google_web_translate-0.2.4 lib/google_web_translate/server.rb