Class: TildeScraper::Group
Constant Summary
collapse
- @@all =
[]
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
create, create_from_array
#add_attributes, #initialize
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
5
6
7
|
# File 'lib/tilde_scraper/group.rb', line 5
def description
@description
end
|
#name ⇒ Object
Returns the value of attribute name.
5
6
7
|
# File 'lib/tilde_scraper/group.rb', line 5
def name
@name
end
|
#subs ⇒ Object
Returns the value of attribute subs.
5
6
7
|
# File 'lib/tilde_scraper/group.rb', line 5
def subs
@subs
end
|
Class Method Details
.all ⇒ Object
9
10
11
|
# File 'lib/tilde_scraper/group.rb', line 9
def self.all
@@all
end
|
.display ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/tilde_scraper/group.rb', line 22
def self.display
all.each.with_index(1) do |group, index|
puts index
group.display
puts ""
end
end
|
Instance Method Details
#display ⇒ Object
13
14
15
16
|
# File 'lib/tilde_scraper/group.rb', line 13
def display
puts name
puts description + " " + subs
end
|
#get_url ⇒ Object
18
19
20
|
# File 'lib/tilde_scraper/group.rb', line 18
def get_url
"https://tildes.net/#{name}"
end
|