Sha256: e1b9eb212ec3c39d73131c0395e749cb3fc1da8a3db7a0f7a910372dfd393147
Contents?: true
Size: 655 Bytes
Versions: 2
Compression:
Stored size: 655 Bytes
Contents
# encoding: utf-8 require 'active_support/core_ext/object/inclusion' require 'open_classes/string/heading_helper' class String include HeadingHelper # 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.48 | lib/open_classes/string/to_space2_heading.rb |
tbpgr_utils-0.0.47 | lib/open_classes/string/to_space2_heading.rb |