yeti 0.3.2 → 0.3.3

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.
@@ -10,14 +10,6 @@ module Yeti
10
10
  new context, (find_by_id context, id if id)
11
11
  end
12
12
 
13
- def self.find_by_id(context, id)
14
- raise NotImplementedError, "#{inspect}.find_by_id"
15
- end
16
-
17
- def self.new_object(context)
18
- raise NotImplementedError, "#{inspect}.new_object"
19
- end
20
-
21
13
  def initialize(context, edited=nil)
22
14
  @context = context
23
15
  @edited = edited
@@ -81,6 +73,16 @@ module Yeti
81
73
  end
82
74
  end
83
75
 
76
+ protected
77
+
78
+ def self.find_by_id(context, id)
79
+ raise NotImplementedError, "#{inspect}.find_by_id"
80
+ end
81
+
82
+ def self.new_object(context)
83
+ raise NotImplementedError, "#{inspect}.new_object"
84
+ end
85
+
84
86
  private
85
87
 
86
88
  def self.attribute(name, opts={})
@@ -1,3 +1,3 @@
1
1
  module Yeti
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
@@ -4,6 +4,13 @@ module Yeti
4
4
  attr_reader :context, :decorated
5
5
  delegate :id, :to_param, :persisted?, to: :decorated
6
6
 
7
+ def initialize(context, decorated)
8
+ @context = context
9
+ @decorated = decorated
10
+ end
11
+
12
+ protected
13
+
7
14
  def self.from_id(context, id)
8
15
  new context, (find_by_id id if id)
9
16
  end
@@ -12,10 +19,5 @@ module Yeti
12
19
  raise NotImplementedError, "#{inspect}.find_by_id"
13
20
  end
14
21
 
15
- def initialize(context, decorated)
16
- @context = context
17
- @decorated = decorated
18
- end
19
-
20
22
  end
21
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yeti
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-25 00:00:00.000000000 Z
12
+ date: 2013-01-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel