hard-boiled 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,9 +15,10 @@ module HardBoiled
15
15
  attr_reader :subject, :parent_subject
16
16
 
17
17
  def self.define object, parent = nil, &block
18
- new(object, parent).
19
- instance_eval(&block).
20
- to_hash
18
+ # if I could only remove the duplicate `obj`
19
+ obj = new(object, parent)
20
+ obj.instance_eval(&block)
21
+ obj.to_hash
21
22
  end
22
23
 
23
24
  def initialize subject, parent = nil
@@ -1,5 +1,5 @@
1
1
  module Hard
2
2
  module Boiled
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -41,7 +41,7 @@ describe HardBoiled::Presenter do
41
41
  context :nested do
42
42
  let(:egg_box) {
43
43
  OpenStruct.new({
44
- :eggs => [egg],
44
+ :eggs => [egg, conventional_egg],
45
45
  :flavour => "extra tasty",
46
46
  :packaged_at => "2011-11-22"
47
47
  })
@@ -54,6 +54,7 @@ describe HardBoiled::Presenter do
54
54
  time :from => :boil_time, :filters => [:twice_and_a_half], :format => "%.2f minutes"
55
55
  taste :from => :flavour, :parent => true
56
56
  consumer "Lennart", :filters => [:upcase]
57
+ "Return value has to be ignored"
57
58
  end
58
59
 
59
60
  date :from => :packaged_at, :format => "on %s"
@@ -66,6 +67,12 @@ describe HardBoiled::Presenter do
66
67
  :time => "17.50 minutes",
67
68
  :consumer => "LENNART",
68
69
  :taste => "extra tasty"
70
+ },
71
+ {
72
+ :colour => "brownish",
73
+ :time => "12.50 minutes",
74
+ :consumer => "LENNART",
75
+ :taste => "extra tasty"
69
76
  }
70
77
  ],
71
78
  :date => "on 2011-11-22"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hard-boiled
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Lennart Melzer