lib/eol/data_object_builder.rb
# I want to set these once, but I *dont* want them to be a class variable, so that they foundation scenario
# doesn't have to be loaded when the class is first evaluated (but it DOES need to be loaded the first time this
# class is *used*... which makes sense, it relies on foundation in many other ways.
I want to set these once, but I *dont* want them to be a class variable, so that they foundation scenario
doesn't have to be loaded when the class is first evaluated (but it DOES need to be loaded the first time this
class is *used*... which makes sense, it relies on foundation in many other ways.
I want to set these once but I * dont * want them to be a class variable so that they foundation scenario doesn ' t have to be loaded when the class is first evaluated ( but it DOES need to be loaded the first time this class is * used * ... which makes sense it relies on foundation in many other ways .
def mime_types
      @mime_types ||= {
        'Image'      => 'image/jpeg',
        'Sound'      => 'audio/mpeg',
        'Text'       => 'text/html',
        'Video'      => 'video/quicktime',
        'GBIF Image' => 'image/jpeg',
        'IUCN'       => 'text/plain',
        'Flash'      => 'video/x-flv',
        'YouTube'    => 'video/x-flv',
        :default     => 'image/jpeg'
      }
    end
def mime_types @mime_types ||= { 'Image' => 'image/jpeg' , 'Sound' => 'audio/mpeg' , 'Text' => 'text/html' , 'Video' => 'video/quicktime' , 'GBIF Image' => 'image/jpeg' , 'IUCN' => 'text/plain' , 'Flash' => 'video/x-flv' , 'YouTube' => 'video/x-flv' , :default => 'image/jpeg' } end
I want to set these once, but I *dont* want them to be a class variable, so that they foundation scenario
doesn't have to be loaded when the class is first evaluated (but it DOES need to be loaded the first time this
class is *used*... which makes sense, it relies on foundation in many other ways.
I want to set these once but I * dont * want them to be a class variable so that they foundation scenario doesn ' t have to be loaded when the class is first evaluated ( but it DOES need to be loaded the first time this class is * used * ... which makes sense it relies on foundation in many other ways .