Class: VBulletin::Post
Instance Attribute Summary collapse
-
#api ⇒ Object
readonly
Returns the value of attribute api.
-
#author_id ⇒ Object
readonly
Returns the value of attribute author_id.
-
#author_name ⇒ Object
readonly
Returns the value of attribute author_name.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(api, *params) ⇒ Post
constructor
A new instance of Post.
- #thread ⇒ Object
Methods inherited from Base
#construct_full_url, #construct_url, #forums, #get_index, #login, #search
Constructor Details
#initialize(api, *params) ⇒ Post
Returns a new instance of Post.
6 7 8 9 10 11 |
# File 'lib/vbulletin/post.rb', line 6 def initialize(api, *params) @api = api params.each do |key| key.each { |k, v| instance_variable_set("@#{k}", v) } end end |
Instance Attribute Details
#api ⇒ Object (readonly)
Returns the value of attribute api.
4 5 6 |
# File 'lib/vbulletin/post.rb', line 4 def api @api end |
#author_id ⇒ Object (readonly)
Returns the value of attribute author_id.
4 5 6 |
# File 'lib/vbulletin/post.rb', line 4 def @author_id end |
#author_name ⇒ Object (readonly)
Returns the value of attribute author_name.
4 5 6 |
# File 'lib/vbulletin/post.rb', line 4 def @author_name end |
#content ⇒ Object (readonly)
Returns the value of attribute content.
4 5 6 |
# File 'lib/vbulletin/post.rb', line 4 def content @content end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/vbulletin/post.rb', line 4 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/vbulletin/post.rb', line 4 def id @id end |
Instance Method Details
#thread ⇒ Object
20 21 22 |
# File 'lib/vbulletin/post.rb', line 20 def thread @api.search.find_thread_by_post_id(self.id) end |