Class: InstaScraper::HTML::Account
- Inherits:
-
InstaScraper::HTML
- Object
- InstaScraper::HTML
- InstaScraper::HTML::Account
- Defined in:
- lib/insta_scraper/html/account.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(username = nil, html = nil, params = {}) ⇒ Account
constructor
A new instance of Account.
- #url ⇒ Object
Methods inherited from InstaScraper::HTML
Constructor Details
#initialize(username = nil, html = nil, params = {}) ⇒ Account
Returns a new instance of Account.
6 7 8 9 10 11 12 |
# File 'lib/insta_scraper/html/account.rb', line 6 def initialize(username = nil, html = nil, params = {}) raise ArgumentError, 'Provide a username or html string' if !username && !html @username = username @html = html @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
3 4 5 |
# File 'lib/insta_scraper/html/account.rb', line 3 def params @params end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
3 4 5 |
# File 'lib/insta_scraper/html/account.rb', line 3 def username @username end |
Instance Method Details
#url ⇒ Object
14 15 16 |
# File 'lib/insta_scraper/html/account.rb', line 14 def url "https://www.instagram.com/#{username}/#{serialize_params}" end |