Sha256: 4568751188118083935d2095de1e7f9129e32efb94915c67ec1be17a3d699a3f
Contents?: true
Size: 649 Bytes
Versions: 2
Compression:
Stored size: 649 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 grammar. # # ==== 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tbpgr_utils-0.0.50 | lib/open_classes/string/to_space2_heading.rb |
tbpgr_utils-0.0.49 | lib/open_classes/string/to_space2_heading.rb |