Class: BlockKit::Layout::RichText::Elements::Date

Inherits:
Base
  • Object
show all
Defined in:
lib/block_kit/layout/rich_text/elements/date.rb

Instance Method Summary collapse

Methods inherited from Base

#==, fix, #fix_validation_errors, #fix_validation_errors!, fixes, inherited, #initialize, inspect, #inspect, #pretty_print, #to_json

Constructor Details

This class inherits a constructor from BlockKit::Base

Instance Method Details

#as_jsonObject



24
25
26
27
28
29
30
31
# File 'lib/block_kit/layout/rich_text/elements/date.rb', line 24

def as_json(*)
  super.merge(
    timestamp: timestamp.to_i,
    format: format,
    url: url,
    fallback: fallback
  ).compact
end