Module: CMS::Template

Extended by:
Template
Included in:
Template
Defined in:
lib/cms/template.rb

Defined Under Namespace

Classes: InvalidOptionKey

Instance Method Summary collapse

Instance Method Details

#add_comma(content) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/cms/template.rb', line 10

def add_comma content
  if content.strip.present?
    ", #{content}"
  else
    content
  end
end

#inject_options(options) ⇒ Object



6
7
8
# File 'lib/cms/template.rb', line 6

def inject_options options
  "".tap { |s| options.each { |k,v| s << ", #{_validate_option_key(k)}: #{v.inspect}" } }
end