Sha256: 3fda19477ec3a23800a422173cc8d40435b3dd2fc3341922d48720dc00d8dcec
Contents?: true
Size: 440 Bytes
Versions: 5
Compression:
Stored size: 440 Bytes
Contents
module Slacken module Helpers # Public: Provide DSL methods to build a DocumentComponent like S-exp. module DocumentComponentDsl def c(type_name, *children) options = children.first.is_a?(Hash) ? children.shift : {} Slacken::DocumentComponent.new(type_name, children, options) end def text(content) Slacken::DocumentComponent.new(:text, [], content: content) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems