Class: Symbol

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_extensions.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#+(other) ⇒ Object

Create a new symbol a_b from the symbol a and b



18
19
20
# File 'lib/ruby_extensions.rb', line 18

def +(other)
  "#{self}_#{other}".to_sym
end

#tag(name) ⇒ Object

Create a new symbol with _name added



13
14
15
# File 'lib/ruby_extensions.rb', line 13

def tag(name)
  "#{self}_#{name}".to_sym
end