Sha256: 4ea77aa3d0999e6bc883341a548098a9677ac81d48920f8f975197eb9d772299

Contents?: true

Size: 538 Bytes

Versions: 11

Compression:

Stored size: 538 Bytes

Contents

# frozen_string_literal: true

module RocketChat
  #
  # Rocket.Chat Info
  #
  class Info
    # Raw info data
    attr_reader :data

    #
    # @param [Hash] data Raw info data
    #
    def initialize(data)
      @data = data.dup.freeze
    end

    # Rocket.Chat version
    def version
      data['version']
    end

    def inspect
      format(
        '#<%<class_name>s:0x%<object_id>p @version="%<version>s">',
        class_name: self.class.name,
        object_id: object_id,
        version: version
      )
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rocketchat-0.2.6 lib/rocket_chat/info.rb
rocketchat-0.2.5 lib/rocket_chat/info.rb
rocketchat-0.2.4 lib/rocket_chat/info.rb
rocketchat-0.2.3 lib/rocket_chat/info.rb
rocketchat-0.2.2 lib/rocket_chat/info.rb
rocketchat-0.2.1 lib/rocket_chat/info.rb
rocketchat-0.1.23 lib/rocket_chat/info.rb
rocketchat-0.1.22 lib/rocket_chat/info.rb
rocketchat-0.1.21 lib/rocket_chat/info.rb
rocketchat-0.1.20 lib/rocket_chat/info.rb
rocketchat-0.1.19 lib/rocket_chat/info.rb