Class: HackerCurse::ForumComment
- Inherits:
-
Object
- Object
- HackerCurse::ForumComment
- Defined in:
- lib/hacker/curse/abstractsiteparser.rb
Instance Attribute Summary collapse
-
#age ⇒ Object
Returns the value of attribute age.
-
#age_text ⇒ Object
Returns the value of attribute age_text.
-
#comment_text ⇒ Object
Returns the value of attribute comment_text.
-
#comment_url ⇒ Object
Returns the value of attribute comment_url.
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#head ⇒ Object
Returns the value of attribute head.
-
#points ⇒ Object
Returns the value of attribute points.
-
#submitter ⇒ Object
Returns the value of attribute submitter.
-
#submitter_url ⇒ Object
Returns the value of attribute submitter_url.
Instance Method Summary collapse
- #[](sym) ⇒ Object
-
#initialize(h) ⇒ ForumComment
constructor
A new instance of ForumComment.
- #keys ⇒ Object
- #values ⇒ Object
Constructor Details
#initialize(h) ⇒ ForumComment
Returns a new instance of ForumComment.
95 96 97 98 99 100 101 102 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 95 def initialize h @hash = h [:points, :comment_url, :age_text, :age, :submitter, :submitter_url, :comment_text, :head].each do |sym| instance_variable_set("@#{sym.to_s}", h[sym]) end end |
Instance Attribute Details
#age ⇒ Object
Returns the value of attribute age.
91 92 93 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 91 def age @age end |
#age_text ⇒ Object
Returns the value of attribute age_text.
91 92 93 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 91 def age_text @age_text end |
#comment_text ⇒ Object
Returns the value of attribute comment_text.
92 93 94 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 92 def comment_text @comment_text end |
#comment_url ⇒ Object
Returns the value of attribute comment_url.
93 94 95 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 93 def comment_url @comment_url end |
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
94 95 96 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 94 def hash @hash end |
#head ⇒ Object
Returns the value of attribute head.
91 92 93 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 91 def head @head end |
#points ⇒ Object
Returns the value of attribute points.
91 92 93 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 91 def points @points end |
#submitter ⇒ Object
Returns the value of attribute submitter.
90 91 92 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 90 def submitter @submitter end |
#submitter_url ⇒ Object
Returns the value of attribute submitter_url.
90 91 92 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 90 def submitter_url @submitter_url end |
Instance Method Details
#[](sym) ⇒ Object
103 104 105 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 103 def [](sym) @hash[sym] end |
#keys ⇒ Object
106 107 108 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 106 def keys @hash.keys end |
#values ⇒ Object
109 110 111 |
# File 'lib/hacker/curse/abstractsiteparser.rb', line 109 def values @hash.values end |