Class: DBLRuby::Weekend

Inherits:
Object
  • Object
show all
Defined in:
lib/dblruby/weekend.rb

Overview

Find information about the weekend.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Weekend

Initialize the weekend

Parameters:

  • data (JSON)

    the weekend response in JSON form


5
6
7
# File 'lib/dblruby/weekend.rb', line 5

def initialize(data)
  @data = data
end

Instance Attribute Details

#dataObject (readonly) Also known as: to_s

Returns data in raw json form.

Returns:

  • data in raw json form.


10
11
12
# File 'lib/dblruby/weekend.rb', line 10

def data
  @data
end

Instance Method Details

#weekend?true, false Also known as: isweekend

Return the whether it's the weekend.

Returns:

  • (true, false)

    the weekend status.


16
17
18
# File 'lib/dblruby/weekend.rb', line 16

def weekend?
  @data['is_weekend']
end