Blame view

lib/syspro/get_version.rb 297 Bytes
dc8aa5b6   Joe Weakley   Rubocop corrections
1
2
  # frozen_string_literal: true
  
db76748d   Isaac Lewis   cop a bunch of St...
3
  module Syspro
3d0157a5   Isaac Lewis   add logoff
4
5
    class GetVersion < ApiResource
      def self.get_version
dc8aa5b6   Joe Weakley   Rubocop corrections
6
        resp = request(:get, resource_url)
697a8854   Isaac Lewis   update tests
7
        VersionObject.new(resp[0].http_body)
3d0157a5   Isaac Lewis   add logoff
8
      end
49716587   Isaac Lewis   refactor object s...
9
  
3d0157a5   Isaac Lewis   add logoff
10
      def resource_url
dc8aa5b6   Joe Weakley   Rubocop corrections
11
        '/GetVersion'
db76748d   Isaac Lewis   cop a bunch of St...
12
      end
3d0157a5   Isaac Lewis   add logoff
13
14
  
      VersionObject = Struct.new(:version)
db76748d   Isaac Lewis   cop a bunch of St...
15
16
    end
  end