Class: Tentacle::RepoFeed

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(feed) ⇒ RepoFeed

Returns a new instance of RepoFeed



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

def initialize(feed)
  @url, @repo_id, @distro_class = feed.split(',').map { |f| f.strip.chomp }
end

Instance Attribute Details

#distro_classObject (readonly)

Returns the value of attribute distro_class



12
13
14
# File 'lib/tentacle.rb', line 12

def distro_class
  @distro_class
end

#repo_idObject (readonly)

Returns the value of attribute repo_id



12
13
14
# File 'lib/tentacle.rb', line 12

def repo_id
  @repo_id
end

#urlObject (readonly)

Returns the value of attribute url



12
13
14
# File 'lib/tentacle.rb', line 12

def url
  @url
end

Instance Method Details

#to_sObject



17
18
19
# File 'lib/tentacle.rb', line 17

def to_s
  "URL: #{url.red} REPO_ID: #{repo_id} CLASS: #{distro_class}"
end