Class: Praxis::SimpleMediaType
- Inherits:
-
Struct
- Object
- Struct
- Praxis::SimpleMediaType
- Defined in:
- lib/praxis/simple_media_type.rb
Overview
Stripped-down representation of an Internet Media Type where the structure and content of the type are unknown, or are defined externally to the Praxis application.
Instance Attribute Summary collapse
-
#identifier ⇒ Object
Returns the value of attribute identifier.
Instance Method Summary collapse
Instance Attribute Details
#identifier ⇒ Object
Returns the value of attribute identifier
8 9 10 |
# File 'lib/praxis/simple_media_type.rb', line 8 def identifier @identifier end |
Instance Method Details
#describe(shallow = true) ⇒ Object
17 18 19 |
# File 'lib/praxis/simple_media_type.rb', line 17 def describe(shallow=true) {name: name, family: "string", id: id, identifier: identifier} end |
#id ⇒ Object
13 14 15 |
# File 'lib/praxis/simple_media_type.rb', line 13 def id self.class.name.gsub("::",'-') end |
#name ⇒ Object
9 10 11 |
# File 'lib/praxis/simple_media_type.rb', line 9 def name self.class.name end |