aduki 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0681494a2a4133047eb70952bec208ddf1e737e4
4
- data.tar.gz: 76eef24aa7d051a67faae78e7651c879655272fc
3
+ metadata.gz: 0b3953aa4709e4f7e4818e105c28ec4c625c3726
4
+ data.tar.gz: c16d9d42ff965ac449453dcd5288c7fdb634e81a
5
5
  SHA512:
6
- metadata.gz: bb88d8aacc43c875b8f62ddc2cad6dae344adec9c7586afaa93805690d7d13dd3a5508bc8244ecf1a4476a92ccaf0aa16651fb4ef6c1de91f522cfe292f7442f
7
- data.tar.gz: 8f8515478e5beda599113476a6d6d9e51cfd0ff3e6702d1a24db916291dbfab5e36b8ad3076d788190c99c4b76ba9cb83a233a966395357f551cfa1d84da55cd
6
+ metadata.gz: bee1c572fcb3f93fd62c54f8b2caabe7fe271ea4f354a67cc38ee485d6edd45524625bd73d106f87b9f9769be3a7179938ece074ddea3853db509505215e523c
7
+ data.tar.gz: ff843521d375a36bd2b4ff29df620af67932dbd2493ab655eb2f4172808986b2800c6b8327f1b97cfe3ca9b511020977c80a97dfde2890824535b6076076d5da
@@ -187,4 +187,7 @@ module Aduki
187
187
  base.extend Aduki::ClassMethods
188
188
  end
189
189
  end
190
+
191
+ # inherit from this class as shortcut instead of including Initializer
192
+ class Initializable ; include Initializer ; end
190
193
  end
@@ -1,3 +1,3 @@
1
1
  module Aduki
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -20,6 +20,7 @@ end
20
20
 
21
21
  def widget_holder
22
22
  @widget_holder ||= WidgetHolder.find(@widget_holder_id) unless @widget_holder_id.nil? || @widget_holder_id == ''
23
+ @widget_holder
23
24
  end
24
25
 
25
26
  def widget_holder= x
@@ -48,6 +49,7 @@ end
48
49
 
49
50
  def happy_hour
50
51
  @happy_hour ||= HappyHour.open(@happy_hour_time) unless @happy_hour_time.nil? || @happy_hour_time == ''
52
+ @happy_hour
51
53
  end
52
54
 
53
55
  def happy_hour= x
@@ -69,6 +71,7 @@ end
69
71
 
70
72
  def widget
71
73
  @widget ||= WidgetHolder::Base.open(@widget_time) unless @widget_time.nil? || @widget_time == ''
74
+ @widget
72
75
  end
73
76
 
74
77
  def widget= x
@@ -97,6 +100,7 @@ end
97
100
 
98
101
  def birthday_gifts
99
102
  @birthday_gifts ||= BirthdayGift.purchase @birthday_gift_prices unless @birthday_gift_prices.nil?
103
+ @birthday_gifts
100
104
  end
101
105
 
102
106
  def birthday_gifts= x
@@ -124,6 +128,7 @@ end
124
128
 
125
129
  def birthday_gifts
126
130
  @birthday_gifts ||= ToyShop.purchase @birthday_gift_prices unless @birthday_gift_prices.nil?
131
+ @birthday_gifts
127
132
  end
128
133
 
129
134
  def birthday_gifts= x
@@ -22,9 +22,8 @@ City.new("madrid" ).register
22
22
  City.new("stockholm").register
23
23
  City.new("dublin" ).register
24
24
 
25
- class Gift
25
+ class Gift < Aduki::Initializable
26
26
  GIFTS = { }
27
- include Aduki::Initializer
28
27
  attr_accessor :name, :price
29
28
  def self.lookup name
30
29
  name.is_a?(String) ? GIFTS[name] : name.map { |n| GIFTS[n] }
@@ -40,8 +39,7 @@ Gift.new(name: "med_cruise", price: :expensive).register
40
39
  Gift.new(name: "whiskey" , price: :medium ).register
41
40
  Gift.new(name: "cigars" , price: :medium ).register
42
41
 
43
- class Politician
44
- include Aduki::Initializer
42
+ class Politician < Aduki::Initializable
45
43
  attr_accessor :name
46
44
  attr_finder :aduki_find, :name, :city
47
45
  attr_many_finder :lookup, :name, :gifts
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aduki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Conan Dalton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-18 00:00:00.000000000 Z
11
+ date: 2016-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec