class Yarrow::Format::ContentType
Public Class Methods
[](*extensions)
click to toggle source
# File lib/yarrow/format.rb, line 15 def self.[](*extensions) @@extensions_cache = extensions self end
inherited(media_type)
click to toggle source
# File lib/yarrow/format.rb, line 20 def self.inherited(media_type) return if @@extensions_cache.nil? @@extensions_cache.each do |extname| Registry[extname] = media_type end @@extensions_cache = nil end
new(source)
click to toggle source
# File lib/yarrow/format.rb, line 30 def initialize(source) @source = source end
Public Instance Methods
to_s()
click to toggle source
# File lib/yarrow/format.rb, line 34 def to_s @source end