struct Post
- Post
- Struct
- Value
- Object
Included Modules
- JSON::Serializable
Defined in:
models/post.crConstructors
- .new(id : String, author : String, title : String, body : String, source : String, created_at : Time = Time.utc, published_at : Time | Nil = nil, popularity : Float64 = 0, comments : Nil | Array(Comment) = nil, tags : Nil | Array(String) = nil)
- .new(pull : JSON::PullParser)
Instance Method Summary
- #author : String
- #body : String
- #comments : Array(Comment)
- #created_at : Time
- #id : String
- #popularity : Float64
- #published?
- #published_at : Time | Nil
- #source : String
- #tags : Array(String)
- #title : String
Constructor Detail
def self.new(id : String, author : String, title : String, body : String, source : String, created_at : Time = Time.utc, published_at : Time | Nil = nil, popularity : Float64 = 0, comments : Nil | Array(Comment) = nil, tags : Nil | Array(String) = nil)
#