Class: SatanicPages::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/satanic_pages/page.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(full_path, base_path) ⇒ Page

Returns a new instance of Page.



5
6
7
8
9
10
11
12
13
# File 'lib/satanic_pages/page.rb', line 5

def initialize(full_path, base_path)
  @full_path = full_path
  @base_path = base_path
  @path = nil
  @slug = nil
  @content = nil
  @data = nil
  parse!
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



15
16
17
# File 'lib/satanic_pages/page.rb', line 15

def content
  @content
end

#dataObject (readonly)

Returns the value of attribute data.



15
16
17
# File 'lib/satanic_pages/page.rb', line 15

def data
  @data
end

#full_pathObject (readonly)

Returns the value of attribute full_path.



15
16
17
# File 'lib/satanic_pages/page.rb', line 15

def full_path
  @full_path
end

#pathObject (readonly)

Returns the value of attribute path.



15
16
17
# File 'lib/satanic_pages/page.rb', line 15

def path
  @path
end

#slugObject (readonly)

Returns the value of attribute slug.



15
16
17
# File 'lib/satanic_pages/page.rb', line 15

def slug
  @slug
end