Class: Praxis::SimpleMediaType
- Inherits:
-
Struct
- Object
- Struct
- Praxis::SimpleMediaType
- Defined in:
- lib/praxis/simple_media_type.rb
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
3 4 5 |
# File 'lib/praxis/simple_media_type.rb', line 3 def identifier @identifier end |
Instance Method Details
#===(other_thing) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/praxis/simple_media_type.rb', line 8 def ===(other_thing) case other_thing when String identifier == other_thing when MediaType identifier == other_thing.identifier else raise 'can not compare' end end |
#describe(shallow = true) ⇒ Object
19 20 21 |
# File 'lib/praxis/simple_media_type.rb', line 19 def describe(shallow=true) {identifier: identifier} end |
#name ⇒ Object
4 5 6 |
# File 'lib/praxis/simple_media_type.rb', line 4 def name self.class.name end |