From 96d49bf04ce77c975fe500f4d961e4a1ffed4c26 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sun, 30 Dec 2012 14:43:00 +0200 Subject: Use sdoc to generate application code documentation --- doc/code/classes/StaticModel.html | 377 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 377 insertions(+) create mode 100644 doc/code/classes/StaticModel.html (limited to 'doc/code/classes/StaticModel.html') diff --git a/doc/code/classes/StaticModel.html b/doc/code/classes/StaticModel.html new file mode 100644 index 00000000000..46ead77607d --- /dev/null +++ b/doc/code/classes/StaticModel.html @@ -0,0 +1,377 @@ + + + + + StaticModel + + + + + + + + + + + + + +
+
+ +
+ +

Provides an ActiveRecord-like interface to a model whose data is not +persisted to a database.

+ +
+ + + + + + + + + + + + +
Namespace
+ + + + + + +
Methods
+
+ +
#
+
+
    + + +
  • + ==, +
  • + + +
  • + [] +
  • + +
+
+ +
D
+
+ +
+ +
N
+
+ +
+ +
P
+
+ +
+ +
T
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + +
Instance Public methods
+ +
+
+ + ==(other) + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/static_model.rb, line 40
+def ==(other)
+  if other.is_a? StaticModel
+    id == other.id
+  else
+    super
+  end
+end
+
+
+ +
+ +
+
+ + [](key) + + +
+ + +
+

Used by AR for fetching attributes

+ +

Pass it along if we respond to it.

+
+ + + + + + +
+ + +
+
# File app/roles/static_model.rb, line 20
+def [](key)
+  send(key) if respond_to?(key)
+end
+
+
+ +
+ +
+
+ + destroyed?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/static_model.rb, line 36
+def destroyed?
+  false
+end
+
+
+ +
+ +
+
+ + new_record?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/static_model.rb, line 28
+def new_record?
+  false
+end
+
+
+ +
+ +
+
+ + persisted?() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/static_model.rb, line 32
+def persisted?
+  false
+end
+
+
+ +
+ +
+
+ + to_param() + + +
+ + +
+ +
+ + + + + + +
+ + +
+
# File app/roles/static_model.rb, line 24
+def to_param
+  id
+end
+
+
+ +
+
+ +
+ + \ No newline at end of file -- cgit v1.2.1