Class: Feed

Inherits:
Object
  • Object
show all
Defined in:
lib/feed.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#groupObject (readonly)

Returns the value of attribute group.



2
3
4
# File 'lib/feed.rb', line 2

def group
  @group
end

#urlObject (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_sObject



13
14
15
# File 'lib/feed.rb', line 13

def to_s
  "[#{@group}] #{@url}"
end