Class: Xapi::About

Inherits:
Object
  • Object
show all
Defined in:
lib/xapi/about.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ About

Returns a new instance of About.



6
7
8
9
10
11
12
13
# File 'lib/xapi/about.rb', line 6

def initialize(options={})
  json = options.fetch(:json, nil)
  if json
    attributes = JSON.parse(json)
    @versions = attributes['version'] if attributes['version']
    @extensions = attributes['extensions'] if attributes['extensions']
  end
end

Instance Attribute Details

#extensionsObject

Returns the value of attribute extensions.



4
5
6
# File 'lib/xapi/about.rb', line 4

def extensions
  @extensions
end

#versionsObject

Returns the value of attribute versions.



4
5
6
# File 'lib/xapi/about.rb', line 4

def versions
  @versions
end