class RDaux::Web::Site::Section

Attributes

contents[W]
key[R]
sections[RW]

Public Class Methods

new(key) click to toggle source
# File lib/rdaux/web/site.rb, line 11
def initialize(key)
  @key = key
end

Public Instance Methods

contents() click to toggle source
# File lib/rdaux/web/site.rb, line 19
def contents
  @contents && @contents.read
end
has_children?() click to toggle source
# File lib/rdaux/web/site.rb, line 23
def has_children?
  @sections && !@sections.empty?
end
has_contents?() click to toggle source
# File lib/rdaux/web/site.rb, line 27
def has_contents?
  !@contents.nil?
end
title() click to toggle source
# File lib/rdaux/web/site.rb, line 15
def title
  @title ||= @key.split('-').map(&:capitalize).join(' ')
end