Class: Page

Inherits:
Object
  • Object
show all
Defined in:
app/models/page.rb

Overview

This is an example application model and will get loaded into the global namespace. Corrupt uses DataMapper by default, however, a model can be any Ruby class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title) ⇒ Page

Returns a new instance of Page.



7
8
9
10
# File 'app/models/page.rb', line 7

def initialize(title)
  @title   = title
  @content = ''
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



5
6
7
# File 'app/models/page.rb', line 5

def content
  @content
end

#titleObject

Returns the value of attribute title.



5
6
7
# File 'app/models/page.rb', line 5

def title
  @title
end