Class: Praxis::SimpleMediaType

Inherits:
Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#identifierObject

Returns the value of attribute identifier

Returns:

  • (Object)

    the current value of identifier



9
10
11
# File 'lib/praxis/simple_media_type.rb', line 9

def identifier
  @identifier
end

Class Method Details

.idObject



14
15
16
# File 'lib/praxis/simple_media_type.rb', line 14

def self.id
  'Praxis-SimpleMediaType'
end

Instance Method Details

#describeObject



22
23
24
# File 'lib/praxis/simple_media_type.rb', line 22

def describe(*)
  { name: name, family: 'string', id: id, identifier: identifier }
end

#idObject



18
19
20
# File 'lib/praxis/simple_media_type.rb', line 18

def id
  self.class.id
end

#nameObject



10
11
12
# File 'lib/praxis/simple_media_type.rb', line 10

def name
  self.class.name
end