Sha256: 4fcb87921dc0679d95213095cd739caeb45225de0030e18beb94c815b9d83421
Contents?: true
Size: 648 Bytes
Versions: 66
Compression:
Stored size: 648 Bytes
Contents
# encoding: utf-8 require 'active_support/core_ext/object/inclusion' require 'open_classes/string/heading_helper' class String include HeadingHelper # Space2 SPACE2 = ' ' # create heading string with Emmet-like syntax. # # ==== Examples # # > case # # 'hoge>hige'.to_space2_heading # => 'hoge\n hige' # # + case # # 'hoge+hige'.to_space2_heading # => 'hoge\nhige' # # ^ case # # 'hoge>hige^hege'.to_space2_heading # => 'hoge\n hige\nhege' # def to_space2_heading heading = to_heading to_space2 heading end private def to_space2(heading) to_head(heading, SPACE2) end end
Version data entries
66 entries across 66 versions & 1 rubygems