Class: Werewolf::Controllers::Image

Inherits:
R
  • Object
show all
Defined in:
lib/werewolf.rb

Instance Method Summary collapse

Instance Method Details

#get(static_name) ⇒ Object



62
63
64
65
66
# File 'lib/werewolf.rb', line 62

def get(static_name)
  current_dir = File.expand_path(File.dirname(__FILE__))
  @headers["Content-Type"] = "image/png"
  @headers["X-Sendfile"]   = "#{current_dir}/assets/#{static_name}"
end