simplemapper 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/lib/simple_mapper/adapters/http_adapter.rb +36 -5
- data/lib/simple_mapper/base.rb +5 -175
- data/lib/simple_mapper/default_plugins/associations.rb +374 -0
- data/lib/simple_mapper/default_plugins/properties.rb +70 -0
- data/lib/simple_mapper/persistence.rb +169 -0
- data/lib/simple_mapper/plugin_support.rb +19 -0
- data/lib/simple_mapper/support.rb +2 -2
- data/lib/simple_mapper/support/bliss_serializer.rb +43 -12
- data/lib/simple_mapper/support/core_ext.rb +23 -2
- metadata +6 -179
- data/doc/classes/Array.html +0 -158
- data/doc/classes/Array.src/M000005.html +0 -18
- data/doc/classes/Array.src/M000006.html +0 -34
- data/doc/classes/Enumerable.html +0 -131
- data/doc/classes/Enumerable.src/M000040.html +0 -21
- data/doc/classes/Hash.html +0 -173
- data/doc/classes/Hash.src/M000002.html +0 -20
- data/doc/classes/Hash.src/M000003.html +0 -18
- data/doc/classes/Hash.src/M000004.html +0 -34
- data/doc/classes/Inflector.html +0 -516
- data/doc/classes/Inflector.src/M000020.html +0 -22
- data/doc/classes/Inflector.src/M000021.html +0 -25
- data/doc/classes/Inflector.src/M000022.html +0 -25
- data/doc/classes/Inflector.src/M000023.html +0 -22
- data/doc/classes/Inflector.src/M000024.html +0 -18
- data/doc/classes/Inflector.src/M000025.html +0 -22
- data/doc/classes/Inflector.src/M000026.html +0 -18
- data/doc/classes/Inflector.src/M000027.html +0 -18
- data/doc/classes/Inflector.src/M000028.html +0 -18
- data/doc/classes/Inflector.src/M000029.html +0 -18
- data/doc/classes/Inflector.src/M000030.html +0 -19
- data/doc/classes/Inflector.src/M000031.html +0 -18
- data/doc/classes/Inflector.src/M000032.html +0 -22
- data/doc/classes/Inflector.src/M000033.html +0 -27
- data/doc/classes/Inflector/Inflections.html +0 -323
- data/doc/classes/Inflector/Inflections.src/M000034.html +0 -18
- data/doc/classes/Inflector/Inflections.src/M000035.html +0 -18
- data/doc/classes/Inflector/Inflections.src/M000036.html +0 -18
- data/doc/classes/Inflector/Inflections.src/M000037.html +0 -19
- data/doc/classes/Inflector/Inflections.src/M000038.html +0 -18
- data/doc/classes/Inflector/Inflections.src/M000039.html +0 -23
- data/doc/classes/Merb.html +0 -111
- data/doc/classes/Merb/Request.html +0 -139
- data/doc/classes/Merb/Request.src/M000041.html +0 -22
- data/doc/classes/OAuth.html +0 -112
- data/doc/classes/OAuth/RequestProxy.html +0 -111
- data/doc/classes/OAuth/RequestProxy/Base.html +0 -139
- data/doc/classes/OAuth/RequestProxy/Base.src/M000015.html +0 -18
- data/doc/classes/OAuth/Signature.html +0 -111
- data/doc/classes/OAuth/Signature/Base.html +0 -139
- data/doc/classes/OAuth/Signature/Base.src/M000014.html +0 -25
- data/doc/classes/OAuthController.html +0 -243
- data/doc/classes/OAuthController.src/M000008.html +0 -22
- data/doc/classes/OAuthController.src/M000009.html +0 -18
- data/doc/classes/OAuthController.src/M000010.html +0 -18
- data/doc/classes/OAuthController.src/M000011.html +0 -25
- data/doc/classes/OAuthController.src/M000012.html +0 -19
- data/doc/classes/Object.html +0 -154
- data/doc/classes/Object.src/M000013.html +0 -19
- data/doc/classes/Proc.html +0 -143
- data/doc/classes/Proc.src/M000007.html +0 -18
- data/doc/classes/Serialize.html +0 -189
- data/doc/classes/Serialize.src/M000016.html +0 -21
- data/doc/classes/Serialize.src/M000017.html +0 -39
- data/doc/classes/Serialize.src/M000018.html +0 -16
- data/doc/classes/Serialize.src/M000019.html +0 -18
- data/doc/classes/SimpleMapper.html +0 -151
- data/doc/classes/SimpleMapper/Base.html +0 -621
- data/doc/classes/SimpleMapper/Base.src/M000067.html +0 -16
- data/doc/classes/SimpleMapper/Base.src/M000068.html +0 -16
- data/doc/classes/SimpleMapper/Base.src/M000069.html +0 -18
- data/doc/classes/SimpleMapper/Base.src/M000070.html +0 -29
- data/doc/classes/SimpleMapper/Base.src/M000071.html +0 -18
- data/doc/classes/SimpleMapper/Base.src/M000072.html +0 -21
- data/doc/classes/SimpleMapper/Base.src/M000073.html +0 -18
- data/doc/classes/SimpleMapper/Base.src/M000074.html +0 -27
- data/doc/classes/SimpleMapper/Base.src/M000075.html +0 -21
- data/doc/classes/SimpleMapper/Base.src/M000076.html +0 -18
- data/doc/classes/SimpleMapper/Base.src/M000077.html +0 -18
- data/doc/classes/SimpleMapper/Base.src/M000078.html +0 -19
- data/doc/classes/SimpleMapper/Base.src/M000079.html +0 -23
- data/doc/classes/SimpleMapper/Base.src/M000080.html +0 -21
- data/doc/classes/SimpleMapper/Base.src/M000081.html +0 -18
- data/doc/classes/SimpleMapper/Base.src/M000082.html +0 -19
- data/doc/classes/SimpleMapper/Base.src/M000083.html +0 -18
- data/doc/classes/SimpleMapper/Base.src/M000085.html +0 -18
- data/doc/classes/SimpleMapper/Base.src/M000086.html +0 -19
- data/doc/classes/SimpleMapper/Base.src/M000087.html +0 -18
- data/doc/classes/SimpleMapper/Base.src/M000088.html +0 -18
- data/doc/classes/SimpleMapper/Base.src/M000089.html +0 -18
- data/doc/classes/SimpleMapper/Base.src/M000090.html +0 -19
- data/doc/classes/SimpleMapper/Base.src/M000091.html +0 -20
- data/doc/classes/SimpleMapper/Base.src/M000092.html +0 -24
- data/doc/classes/SimpleMapper/Base.src/M000093.html +0 -18
- data/doc/classes/SimpleMapper/CallbacksExtension.html +0 -161
- data/doc/classes/SimpleMapper/CallbacksExtension.src/M000056.html +0 -18
- data/doc/classes/SimpleMapper/CallbacksExtension.src/M000057.html +0 -18
- data/doc/classes/SimpleMapper/CallbacksExtension.src/M000058.html +0 -19
- data/doc/classes/SimpleMapper/HttpAdapter.html +0 -289
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000059.html +0 -18
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000060.html +0 -18
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000061.html +0 -19
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000063.html +0 -19
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000064.html +0 -18
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000065.html +0 -18
- data/doc/classes/SimpleMapper/HttpAdapter.src/M000066.html +0 -18
- data/doc/classes/SimpleMapper/HttpOAuthExtension.html +0 -188
- data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000048.html +0 -47
- data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000049.html +0 -21
- data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000050.html +0 -18
- data/doc/classes/SimpleMapper/HttpOAuthExtension.src/M000051.html +0 -24
- data/doc/classes/SimpleMapper/SimpleModel.html +0 -184
- data/doc/classes/SimpleMapper/SimpleModel.src/M000042.html +0 -18
- data/doc/classes/SimpleMapper/SimpleModel.src/M000043.html +0 -18
- data/doc/classes/SimpleMapper/SimpleModel.src/M000044.html +0 -18
- data/doc/classes/SimpleMapper/SimpleModel.src/M000045.html +0 -24
- data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.html +0 -146
- data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.src/M000046.html +0 -19
- data/doc/classes/SimpleMapper/SimpleModel/ClassMethods.src/M000047.html +0 -19
- data/doc/classes/SimpleMapper/XmlFormat.html +0 -169
- data/doc/classes/SimpleMapper/XmlFormat.src/M000052.html +0 -18
- data/doc/classes/SimpleMapper/XmlFormat.src/M000053.html +0 -18
- data/doc/classes/SimpleMapper/XmlFormat.src/M000054.html +0 -20
- data/doc/classes/SimpleMapper/XmlFormat/ClassMethods.html +0 -152
- data/doc/classes/SimpleMapper/XmlFormat/ClassMethods.src/M000055.html +0 -32
- data/doc/classes/String.html +0 -120
- data/doc/classes/Time.html +0 -139
- data/doc/classes/Time.src/M000001.html +0 -18
- data/doc/created.rid +0 -1
- data/doc/files/LICENSE.html +0 -129
- data/doc/files/README.html +0 -130
- data/doc/files/lib/simple_mapper/adapters/http_adapter_rb.html +0 -111
- data/doc/files/lib/simple_mapper/base_rb.html +0 -108
- data/doc/files/lib/simple_mapper/default_plugins/callbacks_rb.html +0 -101
- data/doc/files/lib/simple_mapper/default_plugins/oauth_rb.html +0 -110
- data/doc/files/lib/simple_mapper/default_plugins/options_to_query_rb.html +0 -116
- data/doc/files/lib/simple_mapper/default_plugins/simple_model_rb.html +0 -101
- data/doc/files/lib/simple_mapper/formats/xml_format_rb.html +0 -110
- data/doc/files/lib/simple_mapper/support/bliss_serializer_rb.html +0 -110
- data/doc/files/lib/simple_mapper/support/core_ext_rb.html +0 -108
- data/doc/files/lib/simple_mapper/support/inflections_rb.html +0 -101
- data/doc/files/lib/simple_mapper/support/inflector_rb.html +0 -108
- data/doc/files/lib/simple_mapper/support_rb.html +0 -109
- data/doc/files/lib/simple_mapper_rb.html +0 -137
- data/doc/fr_class_index.html +0 -53
- data/doc/fr_file_index.html +0 -41
- data/doc/fr_method_index.html +0 -119
- data/doc/index.html +0 -24
- data/doc/rdoc-style.css +0 -208
- data/lib/simple_mapper/default_plugins/simple_model.rb +0 -36
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>debug? (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 7</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">debug?</span>; <span class="ruby-ivar">@debug</span> <span class="ruby-keyword kw">end</span></pre>
|
|
15
|
-
</body>
|
|
16
|
-
</html>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>debug! (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 8</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">debug!</span>; <span class="ruby-ivar">@debug</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">end</span></pre>
|
|
15
|
-
</body>
|
|
16
|
-
</html>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>connection_adapters (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 10</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connection_adapters</span>
|
|
15
|
-
<span class="ruby-ivar">@connection_adapters</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">h</span>,<span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">h</span>[<span class="ruby-identifier">k</span>] = {}}
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>add_connection_adapter (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 14</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_connection_adapter</span>(<span class="ruby-identifier">name_or_adapter</span>,<span class="ruby-identifier">adapter</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
15
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">nil?</span>
|
|
16
|
-
<span class="ruby-identifier">adapter</span> = <span class="ruby-identifier">name_or_adapter</span>
|
|
17
|
-
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">:default</span>
|
|
18
|
-
<span class="ruby-keyword kw">else</span>
|
|
19
|
-
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">name_or_adapter</span>.<span class="ruby-identifier">to_sym</span>
|
|
20
|
-
<span class="ruby-keyword kw">end</span>
|
|
21
|
-
<span class="ruby-comment cmt"># Should complain if the adapter doesn't exist.</span>
|
|
22
|
-
<span class="ruby-identifier">connection_adapters</span>[<span class="ruby-identifier">name</span>][<span class="ruby-identifier">:adapter</span>] = <span class="ruby-identifier">adapter</span>
|
|
23
|
-
<span class="ruby-identifier">require</span> <span class="ruby-node">"#{File.dirname(__FILE__)}/adapters/#{adapter}_adapter"</span>
|
|
24
|
-
<span class="ruby-identifier">connection_adapters</span>[<span class="ruby-identifier">name</span>][<span class="ruby-identifier">:init_block</span>] = <span class="ruby-identifier">block</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
|
25
|
-
<span class="ruby-identifier">connection_adapters</span>[<span class="ruby-identifier">name</span>][<span class="ruby-identifier">:debug</span>] = <span class="ruby-ivar">@debug</span>
|
|
26
|
-
[<span class="ruby-identifier">name</span>, <span class="ruby-identifier">adapter</span>]
|
|
27
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
28
|
-
</body>
|
|
29
|
-
</html>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>clone_connection (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 32</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clone_connection</span>(<span class="ruby-identifier">klass</span>,<span class="ruby-identifier">adapter_name</span>=<span class="ruby-keyword kw">nil</span>)
|
|
15
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-value str">'Not Implemented!'</span>
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>format= (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 38</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">format=</span>(<span class="ruby-identifier">format</span>)
|
|
15
|
-
<span class="ruby-ivar">@format_name</span> = <span class="ruby-identifier">format</span>.<span class="ruby-identifier">to_s</span>
|
|
16
|
-
<span class="ruby-identifier">require</span> <span class="ruby-node">"#{File.dirname(__FILE__)}/formats/#{@format_name}_format"</span>
|
|
17
|
-
<span class="ruby-ivar">@format</span> = <span class="ruby-constant">Object</span>.<span class="ruby-identifier">module_eval</span>(<span class="ruby-node">"::SimpleMapper::#{@format_name.camelize}Format"</span>, <span class="ruby-keyword kw">__FILE__</span>, <span class="ruby-keyword kw">__LINE__</span>)
|
|
18
|
-
<span class="ruby-identifier">include</span> <span class="ruby-ivar">@format</span>
|
|
19
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
20
|
-
</body>
|
|
21
|
-
</html>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>connections (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 47</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connections</span>
|
|
15
|
-
<span class="ruby-ivar">@connections</span> <span class="ruby-operator">||=</span> {}
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>connection (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 50</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">connection</span>(<span class="ruby-identifier">name</span>=<span class="ruby-identifier">:default</span>,<span class="ruby-identifier">refresh</span>=<span class="ruby-keyword kw">false</span>)
|
|
15
|
-
<span class="ruby-identifier">connections</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-keyword kw">begin</span>
|
|
16
|
-
<span class="ruby-comment cmt"># Initialize the connection with the connection adapter.</span>
|
|
17
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-value str">"Must include :adapter!"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">connection_adapters</span>[<span class="ruby-identifier">name</span>][<span class="ruby-identifier">:adapter</span>].<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">camelize</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>
|
|
18
|
-
<span class="ruby-identifier">adapter</span> = <span class="ruby-constant">Object</span>.<span class="ruby-identifier">module_eval</span>(<span class="ruby-node">"::SimpleMapper::#{connection_adapters[name][:adapter].to_s.camelize}Adapter"</span>, <span class="ruby-keyword kw">__FILE__</span>, <span class="ruby-keyword kw">__LINE__</span>).<span class="ruby-identifier">new</span>
|
|
19
|
-
<span class="ruby-identifier">connection_adapters</span>[<span class="ruby-identifier">name</span>][<span class="ruby-identifier">:init_block</span>].<span class="ruby-identifier">in_context</span>(<span class="ruby-identifier">adapter</span>).<span class="ruby-identifier">call</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">connection_adapters</span>[<span class="ruby-identifier">name</span>][<span class="ruby-identifier">:init_block</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Proc</span>)
|
|
20
|
-
<span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">set_headers</span> <span class="ruby-identifier">format</span>.<span class="ruby-identifier">mime_type_headers</span>
|
|
21
|
-
<span class="ruby-identifier">adapter</span>.<span class="ruby-identifier">debug!</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">connection_adapters</span>[<span class="ruby-identifier">name</span>][<span class="ruby-identifier">:debug</span>]
|
|
22
|
-
<span class="ruby-identifier">adapter</span>
|
|
23
|
-
<span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">connections</span>[<span class="ruby-identifier">name</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">refresh</span>
|
|
24
|
-
<span class="ruby-identifier">connections</span>[<span class="ruby-identifier">name</span>]
|
|
25
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
26
|
-
</body>
|
|
27
|
-
</html>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>get (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 64</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
15
|
-
<span class="ruby-identifier">adapter</span> = <span class="ruby-identifier">adapter_from_args</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
16
|
-
<span class="ruby-identifier">objs</span> = <span class="ruby-identifier">extract_from</span>(<span class="ruby-identifier">connection</span>(<span class="ruby-identifier">adapter</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">:default</span>).<span class="ruby-identifier">get</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>))
|
|
17
|
-
<span class="ruby-identifier">objs</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">objs</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-identifier">:@adapter</span>, <span class="ruby-identifier">adapter</span>)} <span class="ruby-operator">:</span> <span class="ruby-identifier">objs</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-identifier">:@adapter</span>, <span class="ruby-identifier">adapter</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">adapter</span>
|
|
18
|
-
<span class="ruby-identifier">objs</span>
|
|
19
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
20
|
-
</body>
|
|
21
|
-
</html>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>create (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 72</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
|
15
|
-
<span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>).<span class="ruby-identifier">save</span>
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>persistent? (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 76</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">persistent?</span>
|
|
15
|
-
<span class="ruby-keyword kw">true</span>
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>extract_from (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 80</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">extract_from</span>(<span class="ruby-identifier">formatted_data</span>)
|
|
15
|
-
<span class="ruby-identifier">objs</span> = <span class="ruby-identifier">send</span>(<span class="ruby-node">"from_#{format_name}"</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">formatted_data</span>)
|
|
16
|
-
<span class="ruby-identifier">objs</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">objs</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">extended</span> {<span class="ruby-ivar">@persisted</span> = <span class="ruby-keyword kw">true</span>}} <span class="ruby-operator">:</span> <span class="ruby-identifier">objs</span>.<span class="ruby-identifier">extended</span> {<span class="ruby-ivar">@persisted</span> = <span class="ruby-keyword kw">true</span>}
|
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
-
</body>
|
|
19
|
-
</html>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>extract_one (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 85</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">extract_one</span>(<span class="ruby-identifier">formatted_data</span>, <span class="ruby-identifier">identifier</span>=<span class="ruby-keyword kw">nil</span>)
|
|
15
|
-
<span class="ruby-identifier">objs</span> = <span class="ruby-identifier">extract_from</span>(<span class="ruby-identifier">formatted_data</span>)
|
|
16
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">objs</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
|
|
17
|
-
<span class="ruby-identifier">identifier</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-identifier">objs</span>.<span class="ruby-identifier">first</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">objs</span>.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">identifier</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">identifier</span>}[<span class="ruby-value">0</span>]
|
|
18
|
-
<span class="ruby-keyword kw">else</span>
|
|
19
|
-
<span class="ruby-identifier">identifier</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-value">? </span><span class="ruby-identifier">objs</span> <span class="ruby-operator">:</span> (<span class="ruby-identifier">objs</span>.<span class="ruby-identifier">identifier</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">identifier</span> <span class="ruby-value">? </span><span class="ruby-identifier">objs</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">nil</span>)
|
|
20
|
-
<span class="ruby-keyword kw">end</span>
|
|
21
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
22
|
-
</body>
|
|
23
|
-
</html>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>load (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 94</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load</span>(<span class="ruby-identifier">data</span>=<span class="ruby-keyword kw">nil</span>)
|
|
15
|
-
<span class="ruby-identifier">obj</span> = <span class="ruby-identifier">allocate</span>
|
|
16
|
-
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">original_data</span> = <span class="ruby-identifier">data</span>
|
|
17
|
-
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">:initialize</span>, <span class="ruby-identifier">data</span>)
|
|
18
|
-
<span class="ruby-identifier">obj</span>
|
|
19
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
20
|
-
</body>
|
|
21
|
-
</html>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>new (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 109</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">data</span>=<span class="ruby-keyword kw">nil</span>)
|
|
15
|
-
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">data</span> = <span class="ruby-identifier">data</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">nil?</span>
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>original_data= (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 114</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">original_data=</span>(<span class="ruby-identifier">data</span>)
|
|
15
|
-
<span class="ruby-ivar">@original_data</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">freeze</span>
|
|
16
|
-
<span class="ruby-ivar">@original_attributes</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">keys</span>
|
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
-
</body>
|
|
19
|
-
</html>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>data= (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 121</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">data=</span>(<span class="ruby-identifier">data</span>)
|
|
15
|
-
<span class="ruby-identifier">instantiate</span>(<span class="ruby-identifier">data</span>)
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>data (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 125</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">data</span>
|
|
15
|
-
<span class="ruby-identifier">to_hash</span>
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>instantiate (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 133</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instantiate</span>(<span class="ruby-identifier">data</span>)
|
|
15
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">"data must be a hash"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
|
16
|
-
<span class="ruby-identifier">data</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{k}"</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">v</span>)}
|
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
18
|
-
</body>
|
|
19
|
-
</html>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>formatted_data (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 140</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">formatted_data</span>
|
|
15
|
-
<span class="ruby-identifier">send</span>(<span class="ruby-node">"to_#{self.class.format_name}"</span>.<span class="ruby-identifier">to_sym</span>)
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
-
<!DOCTYPE html
|
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
-
|
|
6
|
-
<html>
|
|
7
|
-
<head>
|
|
8
|
-
<title>dirty? (SimpleMapper::Base)</title>
|
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
-
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
-
</head>
|
|
12
|
-
<body class="standalone-code">
|
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/simple_mapper/base.rb, line 144</span>
|
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dirty?</span>
|
|
15
|
-
<span class="ruby-identifier">data</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">original_data</span>
|
|
16
|
-
<span class="ruby-keyword kw">end</span></pre>
|
|
17
|
-
</body>
|
|
18
|
-
</html>
|