Sha256: 6c35350fb3f3661fa2a348a1073a7d1c75a420aa295859bb72ec68f99e191ed5
Contents?: true
Size: 621 Bytes
Versions: 66
Compression:
Stored size: 621 Bytes
Contents
# encoding: utf-8 require 'active_support/core_ext/object/inclusion' require 'open_classes/string/heading_helper' class String include HeadingHelper # Tab TAB = "\t" # create heading string with Emmet-like syntax. # # ==== Examples # # > case # # 'hoge>hige'.to_tab_heading # => 'hoge\n\thige' # # + case # # 'hoge+hige'.to_tab_heading # => 'hoge\nhige' # # ^ case # # 'hoge>hige^hege'.to_tab_heading # => 'hoge\n\thige\nhege' # def to_tab_heading heading = to_heading to_tab heading end private def to_tab(heading) to_head(heading, TAB) end end
Version data entries
66 entries across 66 versions & 1 rubygems