Class: Page
- Inherits:
-
Object
- Object
- Page
- 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
-
#content ⇒ Object
Returns the value of attribute content.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title) ⇒ Page
constructor
A new instance of Page.
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
#content ⇒ Object
Returns the value of attribute content.
5 6 7 |
# File 'app/models/page.rb', line 5 def content @content end |
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'app/models/page.rb', line 5 def title @title end |