Class: BlockKit::Surfaces::Home

Inherits:
Base
  • Object
show all
Defined in:
lib/block_kit/surfaces/home.rb

Constant Summary collapse

SUPPORTED_ELEMENTS =
[
  Elements::Button,
  Elements::ChannelsSelect,
  Elements::Checkboxes,
  Elements::ConversationsSelect,
  Elements::DatePicker,
  Elements::ExternalSelect,
  Elements::Image,
  Elements::MultiChannelsSelect,
  Elements::MultiConversationsSelect,
  Elements::MultiExternalSelect,
  Elements::MultiStaticSelect,
  Elements::MultiUsersSelect,
  Elements::Overflow,
  Elements::PlainTextInput,
  Elements::RadioButtons,
  Elements::RichTextInput,
  Elements::StaticSelect,
  Elements::TimePicker,
  Elements::UsersSelect
].freeze

Constants inherited from Base

Base::MAX_BLOCKS, Base::SUPPORTED_BLOCKS

Instance Method Summary collapse

Methods inherited from Base

#append, #as_json, #image, inherited

Methods inherited from Base

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

Constructor Details

#initialize(attributes = {}) ⇒ Home

Returns a new instance of Home.



32
33
34
35
36
37
# File 'lib/block_kit/surfaces/home.rb', line 32

def initialize(attributes = {})
  attributes = attributes.with_indifferent_access
  attributes[:blocks] ||= []

  super
end