enjoy_cms 0.2.0.2 → 0.2.0.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/app/controllers/concerns/enjoy/errors.rb +3 -3
- data/app/controllers/concerns/enjoy/localizeable.rb +12 -2
- data/app/controllers/concerns/enjoy/seo_pages.rb +11 -4
- data/app/models/concerns/enjoy/mappable.rb +0 -4
- data/app/models/concerns/enjoy/model_localizeable.rb +30 -0
- data/app/models/concerns/enjoy/seoable.rb +1 -18
- data/app/models/concerns/enjoy/sitemap_data_field.rb +1 -19
- data/app/models/enjoy/contact_message.rb +2 -2
- data/app/models/enjoy/embedded_element.rb +2 -2
- data/app/models/enjoy/embedded_gallery_image.rb +2 -2
- data/app/models/enjoy/gallery.rb +2 -2
- data/app/models/enjoy/gallery_image.rb +2 -2
- data/app/models/enjoy/menu.rb +2 -2
- data/app/models/enjoy/news.rb +2 -2
- data/app/models/enjoy/page.rb +2 -2
- data/app/models/enjoy/seo.rb +2 -3
- data/app/models/enjoy/sitemap_data.rb +2 -3
- data/app/views/shared/_obj.html.slim +1 -0
- data/app/views/simple_captcha/_simple_captcha.html.slim +1 -1
- data/lib/enjoy/admin/contact_message.rb +21 -25
- data/lib/enjoy/admin/embedded_element.rb +22 -5
- data/lib/enjoy/admin/embedded_gallery_image.rb +12 -7
- data/lib/enjoy/admin/gallery.rb +24 -10
- data/lib/enjoy/admin/gallery_image.rb +22 -10
- data/lib/enjoy/admin/menu.rb +10 -18
- data/lib/enjoy/admin/news.rb +62 -45
- data/lib/enjoy/admin/page.rb +64 -67
- data/lib/enjoy/admin/seo.rb +20 -8
- data/lib/enjoy/admin/sitemap_data.rb +27 -0
- data/lib/enjoy/admin.rb +3 -340
- data/lib/enjoy/controllers/sitemap_data.rb +0 -0
- data/lib/enjoy/model.rb +6 -1
- data/lib/enjoy/models/gallery.rb +1 -11
- data/lib/enjoy/models/gallery_image.rb +1 -11
- data/lib/enjoy/models/mongoid/embedded_gallery_image.rb +3 -5
- data/lib/enjoy/models/mongoid/gallery.rb +3 -5
- data/lib/enjoy/models/mongoid/gallery_image.rb +3 -5
- data/lib/enjoy/models/mongoid/menu.rb +1 -11
- data/lib/enjoy/models/mongoid/page.rb +1 -11
- data/lib/enjoy/models/news.rb +0 -2
- data/lib/enjoy/models/seo.rb +2 -0
- data/lib/enjoy/models/sitemap_data.rb +4 -0
- data/lib/enjoy/rails_admin_menu.rb +3 -3
- data/lib/enjoy/version.rb +1 -1
- data/lib/enjoy_cms.rb +16 -3
- metadata +5 -3
- data/lib/enjoy/patch.rb +0 -58
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 378d560813a049c82be0a4330904b9322dd23057
|
4
|
+
data.tar.gz: bf67ae38a9c6a3bdf90ea86f31f8948b0a8f2aee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad5e1a8e2fcebec80b7fc7ff612f4a055aca72cdb57ad3ddb2758d04507fdc21004ab5d72ad3e93edb32207796201d2db6acac84a3419f3759f1893795d1e87c
|
7
|
+
data.tar.gz: 0b76e3c33cb4a274216d5e0ac8c50b03046ff6474a28c3ac34f3c3793defa398b013d4dfa552ab6b3c87e3aa23c067ef755682508986e7555c08a73068787574
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
enjoy_cms (0.2.0.
|
4
|
+
enjoy_cms (0.2.0.3)
|
5
5
|
ack_rails_admin_jcrop
|
6
6
|
addressable
|
7
7
|
ckeditor
|
@@ -89,7 +89,7 @@ GEM
|
|
89
89
|
execjs
|
90
90
|
coffee-script-source (1.10.0)
|
91
91
|
concurrent-ruby (1.0.0)
|
92
|
-
devise (3.5.
|
92
|
+
devise (3.5.6)
|
93
93
|
bcrypt (~> 3.0)
|
94
94
|
orm_adapter (~> 0.1)
|
95
95
|
railties (>= 3.2.6, < 5)
|
@@ -100,7 +100,7 @@ GEM
|
|
100
100
|
execjs (2.6.0)
|
101
101
|
font-awesome-rails (4.5.0.0)
|
102
102
|
railties (>= 3.2, < 5.0)
|
103
|
-
geocoder (1.
|
103
|
+
geocoder (1.3.0)
|
104
104
|
glebtv-simple_captcha (0.6.7)
|
105
105
|
globalid (0.3.6)
|
106
106
|
activesupport (>= 4.1.0)
|
@@ -221,7 +221,7 @@ GEM
|
|
221
221
|
actionpack (>= 4.0)
|
222
222
|
activesupport (>= 4.0)
|
223
223
|
sprockets (>= 3.0.0)
|
224
|
-
stringex (2.
|
224
|
+
stringex (2.6.0)
|
225
225
|
thor (0.19.1)
|
226
226
|
thread_safe (0.3.5)
|
227
227
|
tilt (2.0.2)
|
@@ -231,7 +231,7 @@ GEM
|
|
231
231
|
thread_safe (~> 0.1)
|
232
232
|
validates_email_format_of (1.6.3)
|
233
233
|
i18n
|
234
|
-
warden (1.2.
|
234
|
+
warden (1.2.6)
|
235
235
|
rack (>= 1.0)
|
236
236
|
x-real-ip (0.2.1)
|
237
237
|
activesupport
|
@@ -33,13 +33,13 @@ module Enjoy::Errors
|
|
33
33
|
#redirect_to scope.new_user_session_path, alert: "Необходимо авторизоваться"
|
34
34
|
authenticate_user!
|
35
35
|
else
|
36
|
-
redirect_to '/', alert: t('
|
36
|
+
redirect_to '/', alert: t('enjoy.errors.access_denied')
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
41
|
rescue_from ActionController::InvalidAuthenticityToken do |exception|
|
42
|
-
redirect_to '/', alert: t('
|
42
|
+
redirect_to '/', alert: t('enjoy.errors.form_expired')
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
@@ -71,7 +71,7 @@ module Enjoy::Errors
|
|
71
71
|
Rails.logger.error "__________________________"
|
72
72
|
begin
|
73
73
|
if rails_admin?
|
74
|
-
render text: t('
|
74
|
+
render text: t('enjoy.errors.internal_error_full', klass: exception.class.name, message: exception.message), status: 500
|
75
75
|
return
|
76
76
|
end
|
77
77
|
rescue Exception => e
|
@@ -12,7 +12,7 @@ module Enjoy::Localizeable
|
|
12
12
|
{locale: params[:locale]}
|
13
13
|
end
|
14
14
|
def nav_get_menu_items(type)
|
15
|
-
pages =
|
15
|
+
pages = menu_class.find(type.to_s).pages.enabled
|
16
16
|
if Enjoy.mongoid?
|
17
17
|
pages = pages.where(:"name.#{I18n.locale}".exists => true)
|
18
18
|
elsif Enjoy.active_record?
|
@@ -27,7 +27,17 @@ module Enjoy::Localizeable
|
|
27
27
|
page_class.enabled.where(fullpath: path.gsub(/(\/ru|\/en)/, "")).first
|
28
28
|
end
|
29
29
|
|
30
|
+
def page_class_name
|
31
|
+
"Enjoy::Page"
|
32
|
+
end
|
30
33
|
def page_class
|
31
|
-
|
34
|
+
page_class_name.constantize
|
35
|
+
end
|
36
|
+
|
37
|
+
def menu_class_name
|
38
|
+
"Enjoy::Menu"
|
39
|
+
end
|
40
|
+
def menu_class
|
41
|
+
menu_class_name.constantize
|
32
42
|
end
|
33
43
|
end
|
@@ -22,10 +22,10 @@ module Enjoy::SeoPages
|
|
22
22
|
path = path[0..-2]
|
23
23
|
do_redirect = true
|
24
24
|
end
|
25
|
-
page =
|
25
|
+
page = page_class.enabled.where(fullpath: path).first
|
26
26
|
|
27
27
|
if page.nil? && !params[:slug].blank?
|
28
|
-
page =
|
28
|
+
page = page_class.enabled.where(fullpath: "/" + params[:slug]).first
|
29
29
|
end
|
30
30
|
|
31
31
|
if page.nil?
|
@@ -57,12 +57,12 @@ module Enjoy::SeoPages
|
|
57
57
|
do_redirect = true
|
58
58
|
end
|
59
59
|
|
60
|
-
page =
|
60
|
+
page = page_class.enabled.any_of({fullpath: path}, {redirect: path}).first
|
61
61
|
if page.nil?
|
62
62
|
do_redirect = true
|
63
63
|
spath = path.chomp(File.extname(path))
|
64
64
|
if spath != path
|
65
|
-
page =
|
65
|
+
page = page_class.enabled.any_of({fullpath: spath}, {redirect: spath}).first
|
66
66
|
end
|
67
67
|
end
|
68
68
|
if !page.nil? && do_redirect
|
@@ -77,6 +77,13 @@ module Enjoy::SeoPages
|
|
77
77
|
nil
|
78
78
|
end
|
79
79
|
|
80
|
+
def page_class_name
|
81
|
+
"Enjoy::Page"
|
82
|
+
end
|
83
|
+
def page_class
|
84
|
+
page_class_name.constantize
|
85
|
+
end
|
86
|
+
|
80
87
|
def rails_admin?
|
81
88
|
self.is_a?(RailsAdmin::ApplicationController) || self.is_a?(RailsAdmin::MainController)
|
82
89
|
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Enjoy::ModelLocalizeable
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
module ClassMethods
|
5
|
+
def convert2localize
|
6
|
+
self.all.to_a.map do |p|
|
7
|
+
p.convert2localize
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def convert2localize
|
13
|
+
arr = {}
|
14
|
+
self.localized_fields.keys.each do |f|
|
15
|
+
next if self[f].is_a?(Hash)
|
16
|
+
arr[f] = self.remove_attribute(f)
|
17
|
+
self[f] = {}
|
18
|
+
end
|
19
|
+
self.save
|
20
|
+
|
21
|
+
I18n.available_locales.each do |l|
|
22
|
+
I18n.with_locale(l) do
|
23
|
+
arr.each_pair do |f, v|
|
24
|
+
self.send(f + "=", v)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
self.save
|
29
|
+
end
|
30
|
+
end
|
@@ -4,7 +4,7 @@ module Enjoy::Seoable
|
|
4
4
|
FIELDS = LOCALIZED_FIELDS + [:og_image, :robots]
|
5
5
|
|
6
6
|
included do
|
7
|
-
has_one :seo, as: :seoable, autosave: true, class_name:
|
7
|
+
has_one :seo, as: :seoable, autosave: true, class_name: "Enjoy::Seo"
|
8
8
|
accepts_nested_attributes_for :seo
|
9
9
|
|
10
10
|
delegate *FIELDS, to: :seo
|
@@ -15,7 +15,6 @@ module Enjoy::Seoable
|
|
15
15
|
delegate *(LOCALIZED_FIELDS.map {|f| "#{f}_translations=".to_sym }), to: :seo
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
18
|
alias seo_without_build seo
|
20
19
|
def seo
|
21
20
|
seo_without_build || build_seo
|
@@ -34,20 +33,4 @@ module Enjoy::Seoable
|
|
34
33
|
{aspectRation: 800.0/600.0}
|
35
34
|
end
|
36
35
|
|
37
|
-
module ClassMethods
|
38
|
-
def seo_class_name
|
39
|
-
"Enjoy::Seo"
|
40
|
-
end
|
41
|
-
|
42
|
-
def seo_class
|
43
|
-
seo_class_name.constantize
|
44
|
-
end
|
45
|
-
end
|
46
|
-
def seo_class_name
|
47
|
-
self.class.seo_class_name
|
48
|
-
end
|
49
|
-
|
50
|
-
def seo_class
|
51
|
-
self.class.seo_class
|
52
|
-
end
|
53
36
|
end
|
@@ -3,7 +3,7 @@ module Enjoy::SitemapDataField
|
|
3
3
|
FIELDS = [:sitemap_show, :sitemap_lastmod, :sitemap_changefreq, :sitemap_priority]
|
4
4
|
|
5
5
|
included do
|
6
|
-
has_one :sitemap_data, as: :sitemap_data_field, autosave: true, class_name:
|
6
|
+
has_one :sitemap_data, as: :sitemap_data_field, autosave: true, class_name: "Enjoy::SitemapData"
|
7
7
|
accepts_nested_attributes_for :sitemap_data
|
8
8
|
|
9
9
|
delegate *FIELDS, to: :sitemap_data
|
@@ -14,22 +14,4 @@ module Enjoy::SitemapDataField
|
|
14
14
|
sitemap_data_without_build || build_sitemap_data
|
15
15
|
end
|
16
16
|
end
|
17
|
-
|
18
|
-
module ClassMethods
|
19
|
-
def sitemap_data_class_name
|
20
|
-
"Enjoy::SitemapData"
|
21
|
-
end
|
22
|
-
|
23
|
-
def sitemap_data_class
|
24
|
-
sitemap_data_class_name.constantize
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
def sitemap_data_class_name
|
29
|
-
self.class.sitemap_data_class_name
|
30
|
-
end
|
31
|
-
|
32
|
-
def sitemap_data_class
|
33
|
-
self.class.sitemap_data_class
|
34
|
-
end
|
35
17
|
end
|
@@ -2,10 +2,10 @@ module Enjoy
|
|
2
2
|
if Enjoy.mongoid?
|
3
3
|
class EmbeddedElement
|
4
4
|
include Enjoy::Models::EmbeddedElement
|
5
|
-
|
5
|
+
|
6
6
|
|
7
7
|
# use it in inherited model
|
8
|
-
#rails_admin &Enjoy.
|
8
|
+
# rails_admin &Enjoy::Admin::EmbeddedElement.config
|
9
9
|
|
10
10
|
# use it in rails_admin in parent model for sort
|
11
11
|
# sort_embedded({fields: [:embedded_field_1, :embedded_field_2...]})
|
@@ -2,10 +2,10 @@ module Enjoy
|
|
2
2
|
if Enjoy.mongoid?
|
3
3
|
class EmbeddedGalleryImage < Enjoy::EmbeddedElement
|
4
4
|
include Enjoy::Models::EmbeddedGalleryImage
|
5
|
-
|
5
|
+
|
6
6
|
|
7
7
|
# use it in inherited model
|
8
|
-
#rails_admin &Enjoy.
|
8
|
+
# rails_admin &Enjoy::Admin::EmbeddedGalleryImage.config
|
9
9
|
|
10
10
|
# use it in rails_admin in parent model for sort
|
11
11
|
# sort_embedded({fields: [:embedded_field_1, :embedded_field_2...]})
|
data/app/models/enjoy/gallery.rb
CHANGED
data/app/models/enjoy/menu.rb
CHANGED
data/app/models/enjoy/news.rb
CHANGED
data/app/models/enjoy/page.rb
CHANGED
data/app/models/enjoy/seo.rb
CHANGED
@@ -1,35 +1,31 @@
|
|
1
1
|
module Enjoy
|
2
2
|
module Admin
|
3
3
|
module ContactMessage
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
apply_simple_captcha message: Enjoy.configuration.contacts_captcha_error_message
|
11
|
-
|
12
|
-
validates_email_format_of :email, unless: 'email.blank?'
|
13
|
-
if Enjoy.config.contacts_message_required
|
14
|
-
validates_presence_of :content
|
15
|
-
end
|
16
|
-
validate do
|
17
|
-
if email.blank? && phone.blank?
|
18
|
-
errors.add(:email, I18n.t('rs.no_contact_info'))
|
4
|
+
def self.config
|
5
|
+
Proc.new {
|
6
|
+
# navigation_label I18n.t('enjoy.contact_message')
|
7
|
+
field :c_at do
|
8
|
+
read_only true
|
19
9
|
end
|
20
|
-
|
10
|
+
field :name
|
11
|
+
field :content, :text
|
12
|
+
field :email
|
13
|
+
field :phone
|
21
14
|
|
22
|
-
|
23
|
-
|
24
|
-
|
15
|
+
Enjoy.config.contacts_fields.each_pair do |fn, ft|
|
16
|
+
next if ft.nil?
|
17
|
+
if ft.is_a?(Array)
|
18
|
+
field fn, ft[1].to_sym
|
19
|
+
else
|
20
|
+
field fn
|
21
|
+
end
|
22
|
+
end
|
25
23
|
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
if block_given?
|
25
|
+
yield self
|
26
|
+
end
|
29
27
|
|
30
|
-
|
31
|
-
:new_message_email
|
32
|
-
end
|
28
|
+
}
|
33
29
|
end
|
34
30
|
end
|
35
31
|
end
|
@@ -1,11 +1,28 @@
|
|
1
1
|
module Enjoy
|
2
2
|
module Admin
|
3
3
|
module EmbeddedElement
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
def self.config(_navigation_label = I18n.t('enjoy.cms'), fields = {})
|
5
|
+
Proc.new {
|
6
|
+
# navigation_label(_navigation_label) unless _navigation_label.nil?
|
7
|
+
field :enabled, :toggle
|
8
|
+
field :name, :string
|
9
|
+
fields.each_pair do |name, type|
|
10
|
+
if type.nil?
|
11
|
+
field name
|
12
|
+
else
|
13
|
+
if type.is_a?(Array)
|
14
|
+
field name, type[0], &type[1]
|
15
|
+
else
|
16
|
+
field name, type
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
if block_given?
|
22
|
+
yield self
|
23
|
+
end
|
24
|
+
}
|
25
|
+
end
|
9
26
|
end
|
10
27
|
end
|
11
28
|
end
|
@@ -1,14 +1,19 @@
|
|
1
1
|
module Enjoy
|
2
2
|
module Admin
|
3
3
|
module EmbeddedGalleryImage
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
include Enjoy.orm_specific('EmbeddedGalleryImage')
|
4
|
+
def self.config(fields = {})
|
5
|
+
jcrop_proc = Proc.new do
|
6
|
+
jcrop_options :image_jcrop_options
|
7
|
+
end
|
9
8
|
|
10
|
-
|
11
|
-
|
9
|
+
fields = {image: [:jcrop, jcrop_proc]}.merge(fields)
|
10
|
+
if block_given?
|
11
|
+
Enjoy::Admin::EmbeddedElement.config(nil, fields) do |config|
|
12
|
+
yield config
|
13
|
+
end
|
14
|
+
else
|
15
|
+
Enjoy::Admin::EmbeddedElement.config(nil, fields)
|
16
|
+
end
|
12
17
|
end
|
13
18
|
end
|
14
19
|
end
|
data/lib/enjoy/admin/gallery.rb
CHANGED
@@ -1,19 +1,33 @@
|
|
1
1
|
module Enjoy
|
2
2
|
module Admin
|
3
3
|
module Gallery
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
include Enjoy::SitemapData
|
9
|
-
include Enjoy.orm_specific('Gallery')
|
4
|
+
def self.self.config
|
5
|
+
Proc.new {
|
6
|
+
# navigation_label I18n.t('enjoy.gallery')
|
7
|
+
field :enabled, :toggle
|
10
8
|
|
11
|
-
|
9
|
+
field :name, :string
|
10
|
+
field :slugs, :enum do
|
11
|
+
enum_method do
|
12
|
+
:slugs
|
13
|
+
end
|
14
|
+
visible do
|
15
|
+
bindings[:view].current_user.admin?
|
16
|
+
end
|
17
|
+
multiple do
|
18
|
+
true
|
19
|
+
end
|
20
|
+
end
|
21
|
+
field :text_slug
|
12
22
|
|
13
|
-
|
14
|
-
|
23
|
+
field :image, :jcrop do
|
24
|
+
jcrop_options :image_jcrop_options
|
25
|
+
end
|
15
26
|
|
16
|
-
|
27
|
+
if block_given?
|
28
|
+
yield self
|
29
|
+
end
|
30
|
+
}
|
17
31
|
end
|
18
32
|
end
|
19
33
|
end
|
@@ -1,17 +1,29 @@
|
|
1
1
|
module Enjoy
|
2
2
|
module Admin
|
3
3
|
module GalleryImage
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
def self.config(without_gallery = false, fields = {})
|
5
|
+
Proc.new {
|
6
|
+
# navigation_label I18n.t('enjoy.gallery')
|
7
|
+
field :enabled, :toggle
|
8
|
+
unless without_gallery
|
9
|
+
field :gallery
|
10
|
+
end
|
11
|
+
field :name, :string
|
12
|
+
field :image, :jcrop do
|
13
|
+
jcrop_options :image_jcrop_options
|
14
|
+
end
|
15
|
+
fields.each_pair do |name, type|
|
16
|
+
if type.nil?
|
17
|
+
field name
|
18
|
+
else
|
19
|
+
field name, type
|
20
|
+
end
|
21
|
+
end
|
8
22
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
validates_attachment_content_type :image, content_type: /\Aimage\/.*\Z/, if: :image?
|
23
|
+
if block_given?
|
24
|
+
yield self
|
25
|
+
end
|
26
|
+
}
|
15
27
|
end
|
16
28
|
end
|
17
29
|
end
|
data/lib/enjoy/admin/menu.rb
CHANGED
@@ -1,26 +1,18 @@
|
|
1
1
|
module Enjoy
|
2
2
|
module Admin
|
3
3
|
module Menu
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
include ManualSlug
|
8
|
-
include Enjoy.orm_specific('Menu')
|
4
|
+
def self.config
|
5
|
+
Proc.new {
|
6
|
+
# navigation_label 'CMS'
|
9
7
|
|
10
|
-
|
8
|
+
field :enabled, :toggle
|
9
|
+
field :text_slug
|
10
|
+
field :name
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
Rails.cache.delete 'menus'
|
17
|
-
end
|
18
|
-
after_destroy do
|
19
|
-
Rails.cache.delete 'menus'
|
20
|
-
end
|
21
|
-
|
22
|
-
has_and_belongs_to_many :pages, inverse_of: :menus, class_name: "Enjoy::Page"
|
23
|
-
alias_method :items, :pages
|
12
|
+
if block_given?
|
13
|
+
yield self
|
14
|
+
end
|
15
|
+
}
|
24
16
|
end
|
25
17
|
end
|
26
18
|
end
|