class Slackert::Blocks::BlockElement
Abstract BlockElement
. Subclass and override to_slack
to add a new block element.
Public Class Methods
new(type)
click to toggle source
# File lib/slackert/blocks.rb, line 9 def initialize(type) @type = type end
Public Instance Methods
to_slack()
click to toggle source
Returns a hash of the element, ready to be added to the block formatted message. Abstract method that needs to be implemented in each subclassed element.
# File lib/slackert/blocks.rb, line 16 def to_slack raise NoMethodError, 'Override this implementation' end