Class: UrlStore
- Inherits:
-
Object
- Object
- UrlStore
- Defined in:
- lib/url_store.rb
Instance Attribute Summary collapse
-
#urls ⇒ Object
(also: #get_urls)
readonly
Returns the value of attribute urls.
Instance Method Summary collapse
- #get_url ⇒ Object
-
#initialize(url_file) ⇒ UrlStore
constructor
A new instance of UrlStore.
Constructor Details
#initialize(url_file) ⇒ UrlStore
Returns a new instance of UrlStore.
5 6 7 |
# File 'lib/url_store.rb', line 5 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.
2 3 4 |
# File 'lib/url_store.rb', line 2 def urls @urls end |
Instance Method Details
#get_url ⇒ Object
9 10 11 |
# File 'lib/url_store.rb', line 9 def get_url @urls[0] end |