Class: Hotchoc::Blocks::Base

Inherits:
Hotchoc::Base show all
Defined in:
lib/hotchoc/blocks/base.rb

Direct Known Subclasses

Image, Text

Instance Attribute Summary

Attributes inherited from Hotchoc::Base

#item

Instance Method Summary collapse

Methods inherited from Hotchoc::Base

#initialize

Constructor Details

This class inherits a constructor from Hotchoc::Base

Instance Method Details

#created_atObject



16
17
18
# File 'lib/hotchoc/blocks/base.rb', line 16

def created_at
  Time.parse(@item['created_at'])
end

#idObject



4
5
6
# File 'lib/hotchoc/blocks/base.rb', line 4

def id
  @item['id']
end

#positionObject



12
13
14
# File 'lib/hotchoc/blocks/base.rb', line 12

def position
  @item['position']
end

#typeObject



8
9
10
# File 'lib/hotchoc/blocks/base.rb', line 8

def type
  @item['type']
end

#updated_atObject



20
21
22
# File 'lib/hotchoc/blocks/base.rb', line 20

def updated_at
  Time.parse(@item['updated_at'])
end