Class: Feed
- Inherits:
-
Object
- Object
- Feed
- Defined in:
- lib/feed.rb
Instance Attribute Summary collapse
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(url, group) ⇒ Feed
constructor
A new instance of Feed.
- #to_s ⇒ Object
Constructor Details
#initialize(url, group) ⇒ Feed
Returns a new instance of Feed.
4 5 6 7 |
# File 'lib/feed.rb', line 4 def initialize(url, group) @url = url @group = group end |
Instance Attribute Details
#group ⇒ Object (readonly)
Returns the value of attribute group.
2 3 4 |
# File 'lib/feed.rb', line 2 def group @group end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
2 3 4 |
# File 'lib/feed.rb', line 2 def url @url end |
Instance Method Details
#==(other) ⇒ Object
9 10 11 |
# File 'lib/feed.rb', line 9 def ==(other) !other.nil? && @url == other.url && @group == other.group end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/feed.rb', line 13 def to_s "[#{@group}] #{@url}" end |