Sha256: e907caace2a0e3a22da7aac2d571156f462f17aa762906028567be7fa08f88c3

Contents?: true

Size: 583 Bytes

Versions: 3

Compression:

Stored size: 583 Bytes

Contents

# Version information for the host system, kind of like a browser's user agent string.
#
# This could potentially be a part of `Platform` or `VERSION` but both of those are used when building the gemspec,
# which can't depend on other gems.  FIXME: That's no longer accurate, so this could be `Platform.user_agent` instead.
module Maid::UserAgent
  class << self
    def short
      "Maid/#{::Maid.const_get(:VERSION)}"
    end

    # This used to be called `#to_s`, but that made things difficult when testing.
    def value
      "#{short} (#{RUBY_DESCRIPTION})"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
maid-0.10.0 lib/maid/user_agent.rb
maid-0.10.0.pre.alpha.3 lib/maid/user_agent.rb
maid-0.10.0.pre.alpha.2 lib/maid/user_agent.rb