Class: Kentaa::Api::Resources::Banner

Inherits:
Object
  • Object
show all
Defined in:
lib/kentaa/api/resources/banner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Banner

Returns a new instance of Banner.



11
12
13
# File 'lib/kentaa/api/resources/banner.rb', line 11

def initialize(data)
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



9
10
11
# File 'lib/kentaa/api/resources/banner.rb', line 9

def data
  @data
end

Instance Method Details

#created_atObject



19
20
21
# File 'lib/kentaa/api/resources/banner.rb', line 19

def created_at
  Time.parse(data[:created_at]) if data[:created_at]
end

#idObject



15
16
17
# File 'lib/kentaa/api/resources/banner.rb', line 15

def id
  data[:id]
end


35
36
37
# File 'lib/kentaa/api/resources/banner.rb', line 35

def link
  data[:link]
end

#localeObject



39
40
41
# File 'lib/kentaa/api/resources/banner.rb', line 39

def locale
  data[:locale]
end

#textObject



31
32
33
# File 'lib/kentaa/api/resources/banner.rb', line 31

def text
  data[:text]
end

#updated_atObject



23
24
25
# File 'lib/kentaa/api/resources/banner.rb', line 23

def updated_at
  Time.parse(data[:updated_at]) if data[:updated_at]
end

#urlObject



27
28
29
# File 'lib/kentaa/api/resources/banner.rb', line 27

def url
  data[:url]
end