diff options
author | Postmodern <postmodern.mod3@gmail.com> | 2013-07-23 20:34:05 -0700 |
---|---|---|
committer | Postmodern <postmodern.mod3@gmail.com> | 2013-07-23 20:34:05 -0700 |
commit | e1061c6fbccffb2cc63f755f8a4b02eea26312ed (patch) | |
tree | e77609416984c0526b2e06c410fc926adbd293f0 | |
parent | 102a180443effcc1a4441070d2eaa7b089366d53 (diff) | |
download | git-e1061c6fbccffb2cc63f755f8a4b02eea26312ed.tar.gz |
Fix main documentation example so it matches the README.
-rw-r--r-- | lib/mime/types.rb | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/mime/types.rb b/lib/mime/types.rb index d3c6d70d4b..ff2f0914d6 100644 --- a/lib/mime/types.rb +++ b/lib/mime/types.rb @@ -11,16 +11,18 @@ module MIME # == Usage # require 'mime/types' # - # plaintext = MIME::Types['text/plain'] - # print plaintext.media_type # => 'text' - # print plaintext.sub_type # => 'plain' + # plaintext = MIME::Types['text/plain'].first + # # returns [text/plain, text/plan] + # text = plaintext.first + # print text.media_type # => 'text' + # print text.sub_type # => 'plain' # - # puts plaintext.extensions.join(" ") # => 'asc txt c cc h hh cpp' + # puts text.extensions.join(" ") # => 'asc txt c cc h hh cpp' # - # puts plaintext.encoding # => 8bit - # puts plaintext.binary? # => false - # puts plaintext.ascii? # => true - # puts plaintext == 'text/plain' # => true + # puts text.encoding # => 8bit + # puts text.binary? # => false + # puts text.ascii? # => true + # puts text == 'text/plain' # => true # puts MIME::Type.simplified('x-appl/x-zip') # => 'appl/zip' # class Type |