Sha256: 70211c5cd20caab1cee70351d51208f447e0e9ccf61037086da96a8e73d85711
Contents?: true
Size: 591 Bytes
Versions: 18
Compression:
Stored size: 591 Bytes
Contents
module SSMD::Annotations class Annotation class << self def try(text) match = /\A#{regex}\Z/.match text if match new *match.captures end end def regex raise "subclass responsibility" end end def initialize raise "implement expecting one argumnt for each capture group in the regex" end def wrap(text) raise "wrap given text in resulting SSML element" end def combine(annotation) raise "combine this annotation with the given annotation of the same type" end end end
Version data entries
18 entries across 18 versions & 1 rubygems