active_presenter 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/active_presenter/base.rb +2 -0
- data/lib/active_presenter/version.rb +1 -1
- data/test/base_test.rb +5 -0
- metadata +3 -3
@@ -48,6 +48,8 @@ module ActivePresenter
|
|
48
48
|
# If you don't specify an instance, one will be created by calling Model.new
|
49
49
|
#
|
50
50
|
def initialize(args = {})
|
51
|
+
args ||= {}
|
52
|
+
|
51
53
|
presented.each do |type, klass|
|
52
54
|
send("#{type}=", args[type].is_a?(klass) ? args.delete(type) : klass.new)
|
53
55
|
end
|
data/test/base_test.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_presenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Golick & Daniel Haran
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-08-06 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
56
|
requirements: []
|
57
57
|
|
58
58
|
rubyforge_project: active_presenter
|
59
|
-
rubygems_version: 1.
|
59
|
+
rubygems_version: 1.2.0
|
60
60
|
signing_key:
|
61
61
|
specification_version: 2
|
62
62
|
summary: ActivePresenter is the presenter library you already know! (...if you know ActiveRecord)
|