Class: Kentaa::Api::Resources::Banner
- Inherits:
-
Object
- Object
- Kentaa::Api::Resources::Banner
- Defined in:
- lib/kentaa/api/resources/banner.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #created_at ⇒ Object
- #id ⇒ Object
-
#initialize(data) ⇒ Banner
constructor
A new instance of Banner.
- #link ⇒ Object
- #locale ⇒ Object
- #text ⇒ Object
- #updated_at ⇒ Object
- #url ⇒ Object
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
#data ⇒ Object (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_at ⇒ Object
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 |
#id ⇒ Object
15 16 17 |
# File 'lib/kentaa/api/resources/banner.rb', line 15 def id data[:id] end |
#link ⇒ Object
35 36 37 |
# File 'lib/kentaa/api/resources/banner.rb', line 35 def link data[:link] end |
#locale ⇒ Object
39 40 41 |
# File 'lib/kentaa/api/resources/banner.rb', line 39 def locale data[:locale] end |
#text ⇒ Object
31 32 33 |
# File 'lib/kentaa/api/resources/banner.rb', line 31 def text data[:text] end |
#updated_at ⇒ Object
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 |
#url ⇒ Object
27 28 29 |
# File 'lib/kentaa/api/resources/banner.rb', line 27 def url data[:url] end |