Module: Campo::Iding

Included in:
Base
Defined in:
lib/campo/campo.rb

Overview

Helpers for id’ing fields.

Instance Method Summary collapse

Instance Method Details

#id_tag(val) ⇒ Object

Helps to create a unique id tag.

Parameters:

  • val (String, nil)


28
29
30
# File 'lib/campo/campo.rb', line 28

def id_tag( val )
  val.nil? ? "" : "_#{val}"
end