Class: ONIX::CodeFromYamlWithMime
- Inherits:
-
CodeFromYaml
- Object
- Subset
- Code
- CodeFromYaml
- ONIX::CodeFromYamlWithMime
- Defined in:
- lib/onix/code.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Code
Attributes included from Attributes
Instance Method Summary collapse
-
#mimetype ⇒ String
main formats.
Methods inherited from CodeFromYaml
code_ident, code_identifier, hash, list
Methods inherited from Code
Methods included from CodeMethods
Methods inherited from Subset
parse, #parse, #tag_match, #unsupported
Methods included from Attributes
attribute_class, #parse_attributes, #serialized_attributes
Instance Method Details
#mimetype ⇒ String
main formats
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/onix/code.rb', line 92 def mimetype case self.human when "Epub" "application/epub" when "Pdf" "application/pdf" when "Mobipocket" "application/x-mobipocket-ebook" when "Gif" "image/gif" when "Jpeg" "image/jpeg" when "Png" "image/png" end end |