class Nydp::StringAtom

Attributes

string[RW]

Public Class Methods

new(string ;) click to toggle source
# File lib/nydp/string_atom.rb, line 5
def initialize string ; @string = string ; end

Public Instance Methods

*(other ;) click to toggle source
# File lib/nydp/string_atom.rb, line 18
def *    other ; StringAtom.new(string * other)              ; end
+(other ;) click to toggle source
# File lib/nydp/string_atom.rb, line 20
def +    other ; StringAtom.new "#{@string}#{other}"         ; end
<(other ;) click to toggle source
# File lib/nydp/string_atom.rb, line 17
def <    other ; self.string < other.string                  ; end
<=>(other ;) click to toggle source
# File lib/nydp/string_atom.rb, line 19
def <=>  other ; self < other ? -1 : (self == other ? 0 : 1) ; end
==(other) click to toggle source
# File lib/nydp/string_atom.rb, line 22
def == other
  other.is_a?(Nydp::StringAtom) && (other.to_s == self.to_s)
end
>(other ;) click to toggle source
# File lib/nydp/string_atom.rb, line 16
def >    other ; self.string > other.string                  ; end
eql?(other ;) click to toggle source
# File lib/nydp/string_atom.rb, line 12
def eql? other ; self == other                               ; end
hash() click to toggle source
# File lib/nydp/string_atom.rb, line 14
def hash       ; string.hash                                 ; end
inspect() click to toggle source
# File lib/nydp/string_atom.rb, line 13
def inspect    ; string.inspect                              ; end
length() click to toggle source
# File lib/nydp/string_atom.rb, line 15
def length     ; string.length                               ; end
nydp_type() click to toggle source
# File lib/nydp/string_atom.rb, line 7
def nydp_type  ; :string                                     ; end
to_date() click to toggle source
# File lib/nydp/string_atom.rb, line 11
def to_date    ; ::Date.parse(@string)                       ; end
to_ruby() click to toggle source
# File lib/nydp/string_atom.rb, line 9
def to_ruby    ; string                                      ; end
to_s() click to toggle source
# File lib/nydp/string_atom.rb, line 8
def to_s       ; string                                      ; end
to_sym() click to toggle source
# File lib/nydp/string_atom.rb, line 10
def to_sym     ; string.to_sym                               ; end