Class: URLStore
- Inherits:
-
Object
- Object
- URLStore
- Defined in:
- lib/url_store.rb
Overview
Memory URL Store
Instance Attribute Summary collapse
-
#urls ⇒ Object
(also: #get_urls)
readonly
Returns the value of attribute urls.
Instance Method Summary collapse
- #firt_url ⇒ Object
-
#initialize(url_file) ⇒ URLStore
constructor
A new instance of URLStore.
Constructor Details
#initialize(url_file) ⇒ URLStore
Returns a new instance of URLStore.
6 7 8 |
# File 'lib/url_store.rb', line 6 def initialize(url_file) @urls = read_urls_from_file(url_file) end |
Instance Attribute Details
#urls ⇒ Object (readonly) Also known as: get_urls
Returns the value of attribute urls.
3 4 5 |
# File 'lib/url_store.rb', line 3 def urls @urls end |
Instance Method Details
#firt_url ⇒ Object
10 11 12 |
# File 'lib/url_store.rb', line 10 def firt_url @urls[0] end |