Class: RubyHackernews::CommentsInfo
- Inherits:
-
Object
- Object
- RubyHackernews::CommentsInfo
- Defined in:
- lib/ruby-hackernews/domain/entry/comments_info.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(count, page) ⇒ CommentsInfo
constructor
A new instance of CommentsInfo.
- #url ⇒ Object
Constructor Details
#initialize(count, page) ⇒ CommentsInfo
Returns a new instance of CommentsInfo.
8 9 10 11 |
# File 'lib/ruby-hackernews/domain/entry/comments_info.rb', line 8 def initialize(count, page) @count = count @page = page end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
5 6 7 |
# File 'lib/ruby-hackernews/domain/entry/comments_info.rb', line 5 def count @count end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
6 7 8 |
# File 'lib/ruby-hackernews/domain/entry/comments_info.rb', line 6 def page @page end |
Instance Method Details
#id ⇒ Object
13 14 15 |
# File 'lib/ruby-hackernews/domain/entry/comments_info.rb', line 13 def id return page[/\d+/] end |
#url ⇒ Object
17 18 19 |
# File 'lib/ruby-hackernews/domain/entry/comments_info.rb', line 17 def url return page end |