lib/webby/resources/page.rb
# call-seq:
#    extension    => string
#
# Returns the extension that will be appended to the output destination
# filename. The extension is determined by looking at the following:
#
# * this page's meta-data for an 'extension' property
# * the meta-data of this page's layout for an 'extension' property
# * the extension of this page file
#
call-seq:
extension    => string

Returns the extension that will be appended to the output destination
filename. The extension is determined by looking at the following.


call - seq : extension = > string Returns the extension that will be appended to the output destination filename . The extension is determined by looking at the following .
def extension
    return @mdata['extension'] if @mdata.has_key? 'extension'
    if @mdata.has_key? 'layout'
      lyt = ::Webby::Resources.layouts.find :filename => @mdata['layout']
      ext = lyt ? lyt.extension : nil
      return ext if ext
    end
    @ext
  end
def extension return @mdata [ 'extension' ] if @mdata . has_key? 'extension' if @mdata . has_key? 'layout' lyt = :: Webby :: Resources . layouts . find :filename => @mdata [ 'layout' ] ext = lyt ? lyt . extension : nil return ext if ext end @ext end
call-seq:
extension    => string
call - seq : extension = > string