Module: Ext::View::Base

Defined in:
lib/ext/view.rb

Instance Method Summary collapse

Instance Method Details

#content_typeObject

Shortcut for @headers || ‘text/html’



93
# File 'lib/ext/view.rb', line 93

def content_type; @headers['Content-Type'] || 'text/html' end

#markaby_view?(v) ⇒ Boolean Also known as: has_view?

Returns true if markaby provides this view

Returns:

  • (Boolean)


82
83
84
# File 'lib/ext/view.rb', line 82

def markaby_view?(v)
  app::Views.method_defined? v  # this is specific to markaby
end