Class: Manceps::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/manceps/resource.rb

Overview

An MCP resource definition.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Resource

Returns a new instance of Resource.



8
9
10
11
12
13
14
15
# File 'lib/manceps/resource.rb', line 8

def initialize(data)
  @uri = data['uri']
  @name = data['name']
  @description = data['description']
  @mime_type = data['mimeType']
  @annotations = data['annotations']
  @title = data['title']
end

Instance Attribute Details

#annotationsObject (readonly)

Returns the value of attribute annotations.



6
7
8
# File 'lib/manceps/resource.rb', line 6

def annotations
  @annotations
end

#descriptionObject (readonly)

Returns the value of attribute description.



6
7
8
# File 'lib/manceps/resource.rb', line 6

def description
  @description
end

#mime_typeObject (readonly)

Returns the value of attribute mime_type.



6
7
8
# File 'lib/manceps/resource.rb', line 6

def mime_type
  @mime_type
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/manceps/resource.rb', line 6

def name
  @name
end

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'lib/manceps/resource.rb', line 6

def title
  @title
end

#uriObject (readonly)

Returns the value of attribute uri.



6
7
8
# File 'lib/manceps/resource.rb', line 6

def uri
  @uri
end