Module: Embrace

Defined in:
lib/embrace.rb,
lib/embrace/version.rb,
lib/embrace/brackets.rb

Defined Under Namespace

Modules: Brackets, StringMethods

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.wrap(text, before, after) ⇒ Object



17
18
19
20
21
# File 'lib/embrace.rb', line 17

def wrap(text, before, after)
  return unless text

  "#{before}#{text}#{after}"
end

.wrapper(*with) ⇒ Object



23
24
25
# File 'lib/embrace.rb', line 23

def wrapper(*with)
  ->(text) { wrap(text, *with) }
end