Class: Post
- Inherits:
-
Object
- Object
- Post
- Defined in:
- lib/model/post.rb
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title, subtitle, content, url) ⇒ Post
constructor
A new instance of Post.
Constructor Details
#initialize(title, subtitle, content, url) ⇒ Post
Returns a new instance of Post.
5 6 7 8 9 10 |
# File 'lib/model/post.rb', line 5 def initialize(title, subtitle, content, url) @title = title @subtitle = subtitle @content = content @url = url end |
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/model/post.rb', line 3 def title @title end |