Module: Lotohelp::Lottery

Extended by:
Lottery
Included in:
Lottery
Defined in:
lib/lotohelp/lottery.rb

Overview

Requests library

Class Method Summary collapse

Class Method Details

.last(lottery_slug = nil) ⇒ Hash

Get the last concourse from a specific lottery

Lotohelp::Lottery.last(‘megasena’)

> [‘megasema’, …]

Examples:

Get the last concourse from Mega Sena


Returns:

  • (Hash)


15
16
17
18
19
# File 'lib/lotohelp/lottery.rb', line 15

def self.last(lottery_slug=nil)
  raise ArgumentError("Lottery slug should be an String, #{lottery_slug.class} given") unless lottery_slug.is_a? String
  
  Request::get("/lotteries/#{lottery_slug}/last")
end