Class: Mentawai::Page::Method::ContentType

Inherits:
PageMethod
  • Object
show all
Defined in:
lib/mentawai/page/methods/content_type.rb

Instance Method Summary collapse

Methods inherited from PageMethod

#action, #application, #consequence, #controller, #cookies, #initialize, #input, #locale, #output, #page, #param?, #params, #session

Constructor Details

This class inherits a constructor from Mentawai::Page::PageMethod

Instance Method Details

#set_content_typeObject



9
10
11
12
13
14
# File 'lib/mentawai/page/methods/content_type.rb', line 9

def set_content_type
  raise "Value attribute is mandatory!" if not arg?(:value)
  if consequence and consequence.respond_to?(:content_type=)
    consequence.content_type = arg[:value]                      
  end
end