Class: Symbol

Inherits:
Object show all
Defined in:
lib/RubyExt/symbol.rb

Instance Method Summary collapse

Instance Method Details

#+(other) ⇒ Object



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

def + other
  (self.to_s + other.to_s).to_sym
end

#<=>(other) ⇒ Object



2
3
4
# File 'lib/RubyExt/symbol.rb', line 2

def <=> other
  self.to_s <=> other.to_s
end

#to_ivObject



14
15
16
# File 'lib/RubyExt/symbol.rb', line 14

def to_iv
	"@#{self}"
end

#to_readerObject



6
7
8
# File 'lib/RubyExt/symbol.rb', line 6

def to_reader
  self
end

#to_writerObject



10
11
12
# File 'lib/RubyExt/symbol.rb', line 10

def to_writer
	"#{self}=".to_sym
end