Class: Tsumamigui::Request

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

Constant Summary collapse

INTERVAL =

sec

1.0..3.0

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*urls) ⇒ Request

Returns a new instance of Request.

Parameters:

  • urls (String)
  • urls (Array<String>)

Raises:

  • (ArgumentError)

22
23
24
25
26
# File 'lib/tsumamigui/request.rb', line 22

def initialize(*urls)
  @urls = urls.flatten
  raise ArgumentError, 'No argument is specified' if @urls.empty?
  @urls
end

Instance Attribute Details

#urlsObject (readonly)

Returns the value of attribute urls


18
19
20
# File 'lib/tsumamigui/request.rb', line 18

def urls
  @urls
end

Class Method Details

.run(*urls) ⇒ Array<Tsumamigui::Response>

Parameters:

  • urls (String)
  • urls (Array<String>)

Returns:


11
12
13
# File 'lib/tsumamigui/request.rb', line 11

def run(*urls)
  new(urls).send(:run)
end