Class: Manceps::Resource
- Inherits:
-
Object
- Object
- Manceps::Resource
- Defined in:
- lib/manceps/resource.rb
Overview
An MCP resource definition.
Instance Attribute Summary collapse
-
#annotations ⇒ Object
readonly
Returns the value of attribute annotations.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#mime_type ⇒ Object
readonly
Returns the value of attribute mime_type.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(data) ⇒ Resource
constructor
A new instance of Resource.
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
#annotations ⇒ Object (readonly)
Returns the value of attribute annotations.
6 7 8 |
# File 'lib/manceps/resource.rb', line 6 def annotations @annotations end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/manceps/resource.rb', line 6 def description @description end |
#mime_type ⇒ Object (readonly)
Returns the value of attribute mime_type.
6 7 8 |
# File 'lib/manceps/resource.rb', line 6 def mime_type @mime_type end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/manceps/resource.rb', line 6 def name @name end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
6 7 8 |
# File 'lib/manceps/resource.rb', line 6 def title @title end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
6 7 8 |
# File 'lib/manceps/resource.rb', line 6 def uri @uri end |