Method: Array#to_tags

Defined in:
lib/doing/array.rb

#to_tagsArray

Convert strings to @tags

Examples:

['one', '@two', 'three'].to_tags


=> ['@one', '@two', '@three']


Returns:

  • (Array)

    Array of @tags



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

def to_tags
  map { |t| t.sub(/^@?/, '@') }
end