Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/mspire/ident/pepxml.rb

Instance Method Summary collapse

Instance Method Details

#to_plus_minus_stringObject

returns a string with a + or - on the front



11
12
13
14
15
16
17
# File 'lib/mspire/ident/pepxml.rb', line 11

def to_plus_minus_string
  if self >= 0
    '+' << self.to_s
  else
    self.to_s
  end
end