Class: RocketChat::Info
- Inherits:
-
Object
- Object
- RocketChat::Info
- Defined in:
- lib/rocket_chat/info.rb
Overview
Rocket.Chat Info
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Raw info data.
Instance Method Summary collapse
-
#initialize(data) ⇒ Info
constructor
A new instance of Info.
- #inspect ⇒ Object
-
#version ⇒ Object
Rocket.Chat version.
Constructor Details
#initialize(data) ⇒ Info
Returns a new instance of Info.
14 15 16 |
# File 'lib/rocket_chat/info.rb', line 14 def initialize(data) @data = data.dup.freeze end |
Instance Attribute Details
#data ⇒ Object (readonly)
Raw info data
9 10 11 |
# File 'lib/rocket_chat/info.rb', line 9 def data @data end |
Instance Method Details
#inspect ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/rocket_chat/info.rb', line 23 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 |
#version ⇒ Object
Rocket.Chat version
19 20 21 |
# File 'lib/rocket_chat/info.rb', line 19 def version data['version'] end |