Class: Coopy::SimpleView

Inherits:
Object
  • Object
show all
Includes:
View
Defined in:
lib/coopy/simple_view.rb

Instance Method Summary collapse

Methods included from View

#has_structure?

Instance Method Details

#equals(d1, d2) ⇒ Object



23
24
25
26
27
28
29
# File 'lib/coopy/simple_view.rb', line 23

def equals(d1, d2)
  #trace("Comparing " + d1 + " and " + d2 + " -- " +  (("" + d1) == ("" + d2)));
  return true if (d1==nil && d2==nil)
  return true if (d1==nil && d2.to_s=="")
  return true if (d1.to_s=="" && d2==nil)
  return d1.to_s == d2.to_s
end

#get_bag(d) ⇒ Object



11
12
13
# File 'lib/coopy/simple_view.rb', line 11

def get_bag(d)
  nil
end

#get_table(d) ⇒ Object



15
16
17
# File 'lib/coopy/simple_view.rb', line 15

def get_table(d)
  nil
end

#has_structure(d) ⇒ Object



19
20
21
# File 'lib/coopy/simple_view.rb', line 19

def has_structure(d)
  false
end

#to_datum(str) ⇒ Object



31
32
33
34
# File 'lib/coopy/simple_view.rb', line 31

def to_datum(str)
  return nil if (str==nil)
  return SimpleCell.new(str)
end

#to_s(d) ⇒ Object



6
7
8
9
# File 'lib/coopy/simple_view.rb', line 6

def to_s(d)
  return nil if (d==nil)
  return d.to_s
end