plenty_client 0.0.2 → 0.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/.rubocop.yml +1 -1
- data/README.md +9 -36
- data/Rakefile +3 -3
- data/lib/plenty_client.rb +8 -5
- data/lib/plenty_client/accounting.rb +2 -2
- data/lib/plenty_client/authentication.rb +2 -2
- data/lib/plenty_client/authorization.rb +2 -2
- data/lib/plenty_client/basket.rb +2 -2
- data/lib/plenty_client/basket/item.rb +2 -2
- data/lib/plenty_client/category.rb +6 -7
- data/lib/plenty_client/category/branch.rb +2 -2
- data/lib/plenty_client/category/template.rb +3 -3
- data/lib/plenty_client/comment.rb +3 -3
- data/lib/plenty_client/config.rb +3 -1
- data/lib/plenty_client/endpoint.rb +74 -68
- data/lib/plenty_client/item.rb +7 -2
- data/lib/plenty_client/item/attribute.rb +3 -3
- data/lib/plenty_client/item/attribute/name.rb +12 -20
- data/lib/plenty_client/item/attribute/value.rb +13 -18
- data/lib/plenty_client/item/attribute/value_name.rb +12 -12
- data/lib/plenty_client/item/barcode.rb +3 -3
- data/lib/plenty_client/item/cross_selling.rb +3 -3
- data/lib/plenty_client/item/image.rb +6 -6
- data/lib/plenty_client/item/image/availability.rb +10 -10
- data/lib/plenty_client/item/image/name.rb +14 -24
- data/lib/plenty_client/item/manufacturer.rb +4 -4
- data/lib/plenty_client/item/manufacturer/commission.rb +3 -3
- data/lib/plenty_client/item/property.rb +3 -3
- data/lib/plenty_client/item/property/market_reference.rb +11 -11
- data/lib/plenty_client/item/property/name.rb +12 -17
- data/lib/plenty_client/item/property_group.rb +3 -3
- data/lib/plenty_client/item/property_group_name.rb +8 -10
- data/lib/plenty_client/item/sales_price.rb +3 -4
- data/lib/plenty_client/item/shipping_profile.rb +6 -6
- data/lib/plenty_client/item/unit.rb +3 -4
- data/lib/plenty_client/item/unit_name.rb +12 -11
- data/lib/plenty_client/item/variation.rb +10 -4
- data/lib/plenty_client/item/variation/barcode.rb +3 -3
- data/lib/plenty_client/item/variation/bundle.rb +14 -16
- data/lib/plenty_client/item/variation/category.rb +8 -10
- data/lib/plenty_client/item/variation/client.rb +3 -3
- data/lib/plenty_client/item/variation/default_category.rb +3 -3
- data/lib/plenty_client/item/variation/description.rb +3 -3
- data/lib/plenty_client/item/variation/image.rb +5 -4
- data/lib/plenty_client/item/variation/market.rb +3 -3
- data/lib/plenty_client/item/variation/market_ident_number.rb +3 -3
- data/lib/plenty_client/item/variation/sales_price.rb +13 -17
- data/lib/plenty_client/item/variation/sku.rb +12 -15
- data/lib/plenty_client/item/variation/stock.rb +3 -3
- data/lib/plenty_client/item/variation/supplier.rb +12 -15
- data/lib/plenty_client/item/variation/warehouse.rb +6 -5
- data/lib/plenty_client/item/variation_property.rb +3 -3
- data/lib/plenty_client/item/variation_property_value.rb +10 -14
- data/lib/plenty_client/item_set.rb +4 -4
- data/lib/plenty_client/item_set/component.rb +15 -22
- data/lib/plenty_client/item_set/config.rb +3 -2
- data/lib/plenty_client/order.rb +5 -4
- data/lib/plenty_client/order/contact_wish.rb +2 -3
- data/lib/plenty_client/order/coupon_code.rb +5 -7
- data/lib/plenty_client/order/coupon_code/contact.rb +4 -6
- data/lib/plenty_client/order/coupon_code/validation.rb +4 -6
- data/lib/plenty_client/order/currency.rb +2 -3
- data/lib/plenty_client/order/date.rb +3 -4
- data/lib/plenty_client/order/item.rb +3 -3
- data/lib/plenty_client/order/item/date.rb +2 -2
- data/lib/plenty_client/order/item/property.rb +2 -2
- data/lib/plenty_client/order/item/serial_number.rb +3 -3
- data/lib/plenty_client/order/property.rb +2 -3
- data/lib/plenty_client/order/referrer.rb +2 -3
- data/lib/plenty_client/order/shipping.rb +2 -3
- data/lib/plenty_client/order/shipping/country.rb +2 -2
- data/lib/plenty_client/order/shipping/information.rb +3 -3
- data/lib/plenty_client/order/shipping/package.rb +4 -4
- data/lib/plenty_client/order/shipping/profile.rb +2 -2
- data/lib/plenty_client/order/shipping/service_provider.rb +2 -2
- data/lib/plenty_client/request.rb +121 -98
- data/lib/plenty_client/sales_price/account.rb +2 -3
- data/lib/plenty_client/sales_price/country.rb +2 -2
- data/lib/plenty_client/sales_price/currency.rb +2 -2
- data/lib/plenty_client/sales_price/customer_class.rb +2 -2
- data/lib/plenty_client/sales_price/name.rb +4 -4
- data/lib/plenty_client/sales_price/online_store.rb +2 -3
- data/lib/plenty_client/sales_price/referrer.rb +3 -2
- data/lib/plenty_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e689726c8a6699f7c57b32f82c9cfa6b969c43e
|
4
|
+
data.tar.gz: 3f99888156deccc95fa7d013f39eb4ebcf1deb54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92fc5e2f051a125639bbd5c1c6bec651cd22b55e71a9681426dc8d899959c157189e3ec26d2440a1d403e710edab13838e2f4148cff6265649cab0b681bfe79f
|
7
|
+
data.tar.gz: 655b49ac1d5a8859049fd3fcd20d34a707328854ffbdde49beba7c74a50feb6cb5ff42bcf88a5c9862a2796cabde853a2a29e8a1f4e9a8c7c4bff0a69089bb74
|
data/.rubocop.yml
CHANGED
data/README.md
CHANGED
@@ -36,15 +36,16 @@ PlentyClient::Config.site_url = 'http://plenty7.plentymarkets.de/rest'
|
|
36
36
|
PlentyClient::Config.api_user = 'myusername'
|
37
37
|
PlentyClient::Config.api_password = 'mypassword'
|
38
38
|
PlentyClient::Config.log = true || false
|
39
|
+
PlentyClient::Config.plenty_id = 111111
|
39
40
|
```
|
40
41
|
|
41
42
|
# Calls
|
42
|
-
Once you are set up you can use the client with the following methods:
|
43
|
-
|
44
43
|
Note:
|
45
|
-
- required parameters need to be passed in, otherwise you will
|
44
|
+
- required parameters need to be passed in, otherwise you will receive an PlentyClient::ResponseError
|
46
45
|
- This Client handles no validation, it is only a gateway to the API
|
47
46
|
|
47
|
+
Once you are set up you can use the client like so:
|
48
|
+
|
48
49
|
```ruby
|
49
50
|
PlentyClient::Item.find(103)
|
50
51
|
PlentyClient::Item::Variation.find(103, 105)
|
@@ -56,52 +57,23 @@ PlentyClient::Item.create(parameters)
|
|
56
57
|
|
57
58
|
PlentyClient::Item::Variation.update(103, update_parameters)
|
58
59
|
|
59
|
-
PlentyClient::Item::Variation.
|
60
|
-
|
61
|
-
```
|
62
|
-
|
63
|
-
### Blocks
|
60
|
+
PlentyClient::Item::Variation.destroy(103, 105)
|
64
61
|
|
65
|
-
```ruby
|
66
62
|
# Use blocks to iterate in batches
|
67
63
|
PlentyClient::Item.list do |item|
|
68
64
|
puts item
|
69
65
|
end
|
70
66
|
|
71
67
|
# You can set optional headers after the required parameters of each request
|
72
|
-
PlentyClient::Item::Variation.list(103, {'itemsPerPage' => 1, 'page' => 4}) do |item|
|
68
|
+
PlentyClient::Item::Variation.list(103, { 'itemsPerPage' => 1, 'page' => 4 }) do |item|
|
73
69
|
puts item
|
74
70
|
end
|
75
71
|
```
|
76
72
|
|
77
|
-
### HTTP-Methods
|
78
|
-
|
79
|
-
If there is no resource available you can still make the request like so:
|
80
|
-
```ruby
|
81
|
-
PlentyClient::Request.patch(path, body = {})
|
82
|
-
PlentyClient::Request.put(path, body = {})
|
83
|
-
PlentyClient::Request.post(path, body = {})
|
84
|
-
PlentyClient::Request.delete(path, params = {})
|
85
|
-
PlentyClient::Request.get(path, params = {})
|
86
|
-
PlentyClient::Request.get(path, params = {}) do |body|
|
87
|
-
end
|
88
|
-
```
|
89
|
-
|
90
73
|
### Warnings
|
91
74
|
There is a difference in the get method with and without a block.
|
92
|
-
|
93
|
-
|
94
|
-
```ruby
|
95
|
-
PlentyClient::Request.get(path, params = {})
|
96
|
-
|
97
|
-
```
|
98
|
-
The get-call with the block only returns the entries
|
99
|
-
```ruby
|
100
|
-
PlentyClient::Request.get(path, params = {}) do |body|
|
101
|
-
puts entries
|
102
|
-
end
|
103
|
-
|
104
|
-
```
|
75
|
+
The Call without the block will return the complete response.
|
76
|
+
With the block you will only receive the entries.
|
105
77
|
|
106
78
|
### Debugging
|
107
79
|
If you are not sure which required parameters to pass in simply call
|
@@ -128,6 +100,7 @@ PlentyClient::Item::Variation.routes
|
|
128
100
|
* [`ExportSettings`](https://developers.plentymarkets.com/rest-doc/export_settings)
|
129
101
|
* [~~`Item`~~](https://developers.plentymarkets.com/rest-doc/item)
|
130
102
|
* [`LegalInformation`](https://developers.plentymarkets.com/rest-doc/legal_information)
|
103
|
+
* [`Listing`](https://developers.plentymarkets.com/rest-doc/listing)
|
131
104
|
* [`Market`](https://developers.plentymarkets.com/rest-doc/market)
|
132
105
|
* [~~`Order`~~](https://developers.plentymarkets.com/rest-doc/order)
|
133
106
|
* [`OrderSummary`](https://developers.plentymarkets.com/rest-doc/order_summary)
|
data/Rakefile
CHANGED
data/lib/plenty_client.rb
CHANGED
@@ -2,11 +2,13 @@ require 'curl'
|
|
2
2
|
require 'json'
|
3
3
|
|
4
4
|
module PlentyClient
|
5
|
-
|
6
|
-
|
7
|
-
autoload :
|
8
|
-
autoload :
|
9
|
-
autoload :
|
5
|
+
class ResponseError < StandardError; end
|
6
|
+
|
7
|
+
autoload :Config, 'plenty_client/config'
|
8
|
+
autoload :Constants, 'plenty_client/constants'
|
9
|
+
autoload :Endpoint, 'plenty_client/endpoint'
|
10
|
+
autoload :Request, 'plenty_client/request'
|
11
|
+
autoload :Version, 'plenty_client/version'
|
10
12
|
|
11
13
|
autoload :Accounting, 'plenty_client/accounting'
|
12
14
|
autoload :Authentication, 'plenty_client/authentication'
|
@@ -38,6 +40,7 @@ module PlentyClient
|
|
38
40
|
autoload :PropertyGroupName, 'plenty_client/item/property_group_name'
|
39
41
|
autoload :SalesPrice, 'plenty_client/item/sales_price'
|
40
42
|
autoload :SalesPriceShippingProfile, 'plenty_client/item/sales_price_shipping_profile'
|
43
|
+
autoload :ShippingProfile, 'plenty_client/item/shipping_profile'
|
41
44
|
autoload :Unit, 'plenty_client/item/unit'
|
42
45
|
autoload :UnitName, 'plenty_client/item/unit_name'
|
43
46
|
autoload :Variation, 'plenty_client/item/variation'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module PlentyClient
|
2
2
|
module Accounting
|
3
|
-
|
4
|
-
|
3
|
+
include PlentyClient::Endpoint
|
4
|
+
include PlentyClient::Request
|
5
5
|
|
6
6
|
LIST_VAT_OF_LOCATION = '/vat/locations/{locationId}'.freeze
|
7
7
|
LIST_VAT_OF_COUNTRY = '/vat/locations/{locationId}/countries/{countryId}'.freeze
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module PlentyClient
|
2
2
|
module Authorization
|
3
|
-
|
4
|
-
|
3
|
+
include PlentyClient::Endpoint
|
4
|
+
include PlentyClient::Request
|
5
5
|
|
6
6
|
AUTH_USER = '/authorized_user'.freeze
|
7
7
|
AUTH_USER_WITH_UI_CONFIG = '/user/authorized_user_with_ui_config'.freeze
|
data/lib/plenty_client/basket.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module PlentyClient
|
2
2
|
module Basket
|
3
3
|
class Item
|
4
|
-
|
5
|
-
|
4
|
+
include PlentyClient::Endpoint
|
5
|
+
include PlentyClient::Request
|
6
6
|
|
7
7
|
CREATE_BASKET_ITEM = '/basket/items'.freeze
|
8
8
|
LIST_BASKET_ITEMS = '/basket/items'.freeze
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module PlentyClient
|
2
2
|
module Category
|
3
|
-
|
4
|
-
|
3
|
+
include PlentyClient::Endpoint
|
4
|
+
include PlentyClient::Request
|
5
5
|
|
6
6
|
FIND_CATEGORY = '/categories/{catId}'.freeze
|
7
7
|
LIST_CATEGORIES = '/categories'.freeze
|
@@ -26,23 +26,22 @@ module PlentyClient
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def update(cat_id, body = {})
|
29
|
-
post(build_endpoint(UPDATE_CATEGORY,
|
30
|
-
cat: cat_id), body)
|
29
|
+
post(build_endpoint(UPDATE_CATEGORY, cat: cat_id), body)
|
31
30
|
end
|
32
31
|
|
33
32
|
def update_all(body = {})
|
34
33
|
post(build_endpoint(UPDATE_CATEGORIES), body)
|
35
34
|
end
|
36
35
|
|
37
|
-
def
|
36
|
+
def destroy(cat_id, body = {})
|
38
37
|
delete(build_endpoint(DELETE_CATEGORY, cat: cat_id), body)
|
39
38
|
end
|
40
39
|
|
41
|
-
def
|
40
|
+
def destroy_details(cat_id, body = {})
|
42
41
|
delete(build_endpoint(DELETE_CATEGORY_DETAILS, cat: cat_id), body)
|
43
42
|
end
|
44
43
|
|
45
|
-
def
|
44
|
+
def destroy_clients(cat_id, body = {})
|
46
45
|
delete(build_endpoint(DELETE_CATEGORY_CLIENTS, cat: cat_id), body)
|
47
46
|
end
|
48
47
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module PlentyClient
|
2
2
|
module Category
|
3
3
|
class Branch
|
4
|
-
|
5
|
-
|
4
|
+
include PlentyClient::Endpoint
|
5
|
+
include PlentyClient::Request
|
6
6
|
|
7
7
|
FIND_CATEGORY_BRANCH = '/category_branches/{catId}'.freeze
|
8
8
|
LIST_CATEGORY_BRANCH = '/category_branches'.freeze
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module PlentyClient
|
2
2
|
module Category
|
3
3
|
class Template
|
4
|
-
|
5
|
-
|
4
|
+
include PlentyClient::Endpoint
|
5
|
+
include PlentyClient::Request
|
6
6
|
|
7
7
|
FIND_CATEGORY_TEMPLATE = '/categories/{catId}/templates'.freeze
|
8
8
|
UPDATE_CATEGORY_TEMPLATE = '/categories/{catId}/templates'.freeze
|
@@ -19,7 +19,7 @@ module PlentyClient
|
|
19
19
|
cat: cat_id), body)
|
20
20
|
end
|
21
21
|
|
22
|
-
def
|
22
|
+
def destroy(cat_id, body = {})
|
23
23
|
delete(build_endpoint(DELETE_CATEGORY_TEMPLATE,
|
24
24
|
cat: cat_id), body)
|
25
25
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module PlentyClient
|
2
2
|
module Comment
|
3
|
-
|
4
|
-
|
3
|
+
include PlentyClient::Endpoint
|
4
|
+
include PlentyClient::Request
|
5
5
|
|
6
6
|
FIND_COMMENT = '/comments/{commentId}'.freeze
|
7
7
|
LIST_COMMENTS = '/comments/{referenceType}/{referenceValue}'.freeze
|
@@ -23,7 +23,7 @@ module PlentyClient
|
|
23
23
|
post(CREATE_CATEGORY, body)
|
24
24
|
end
|
25
25
|
|
26
|
-
def
|
26
|
+
def destroy(cat_id, body = {})
|
27
27
|
delete(build_endpoint(DELETE_CATEGORY, comment: cat_id), body)
|
28
28
|
end
|
29
29
|
end
|
data/lib/plenty_client/config.rb
CHANGED
@@ -2,13 +2,15 @@ module PlentyClient
|
|
2
2
|
class Config
|
3
3
|
class NoCredentials < StandardError; end
|
4
4
|
class NoToken < StandardError; end
|
5
|
+
class NoPlentyId < StandardError; end
|
5
6
|
|
6
7
|
class << self
|
7
|
-
attr_accessor :site_url, :api_user, :api_password, :access_token, :refresh_token, :log
|
8
|
+
attr_accessor :site_url, :api_user, :api_password, :access_token, :refresh_token, :log, :expiry_date, :plenty_id
|
8
9
|
|
9
10
|
def validate
|
10
11
|
raise NoCredentials if site_url.nil? || api_user.nil? || api_password.nil?
|
11
12
|
raise NoToken if access_token.nil? || refresh_token.nil?
|
13
|
+
raise NoPlentyId if plenty_id.blank?
|
12
14
|
end
|
13
15
|
end
|
14
16
|
end
|
@@ -1,77 +1,83 @@
|
|
1
1
|
module PlentyClient
|
2
2
|
module Endpoint
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
3
|
+
module ClassMethods
|
4
|
+
# Method that replaces the arguments in an endpoint with the given parameters.
|
5
|
+
# Arguments that are passed to the build_endpoint method, but do not
|
6
|
+
# live in the endpoint, are discarded.
|
7
|
+
def build_endpoint(api_endpoint_template, arguments = {})
|
8
|
+
# Duplicate constant to temporary endpoint string
|
9
|
+
api_endpoint_result = api_endpoint_template.dup
|
10
|
+
# Endpoint parameters hash that links symbols to regex
|
11
|
+
endpoint_parameters = {
|
12
|
+
account: /\{accountId\}/,
|
13
|
+
account_ype: /\{accountType\}/,
|
14
|
+
attribute: /\{attributeId\}/,
|
15
|
+
attribute_value: /\{attributeValueId\}/,
|
16
|
+
barcode: /\{barcodeId\}/,
|
17
|
+
bundle: /\{bundleId\}/,
|
18
|
+
cat: /\{catId\}/,
|
19
|
+
commission: /\{commissionId\}/,
|
20
|
+
component: /\{componentId\}/,
|
21
|
+
comment: /\{commentId\}/,
|
22
|
+
contact: /\{contactId\}/,
|
23
|
+
country: /\{countryId\}/,
|
24
|
+
coupon_string: /\{coupon\}/,
|
25
|
+
cross_item: /\{crossItemId\}/,
|
26
|
+
currency: /\{currencyIso\}/,
|
27
|
+
customer_class: /\{customerClassId\}/,
|
28
|
+
image: /\{imageId\}/,
|
29
|
+
item: /\{itemId\}/,
|
30
|
+
item_set: /\{itemSetId\}/,
|
31
|
+
lang: /\{lang\}/,
|
32
|
+
location: /\{locationId\}/,
|
33
|
+
manufacturer: /\{manufacturerId\}/,
|
34
|
+
market: /\{marketId\}/,
|
35
|
+
market_ident_number: /\{marketIdentNumberId\}/,
|
36
|
+
marketplace: /\{marketplaceId\}/,
|
37
|
+
order: /\{orderId\}/,
|
38
|
+
order_item: /\{orderItemId\}/,
|
39
|
+
parent_referrer: /\{parentReferrerId\}/,
|
40
|
+
plenty: /\{plentyId\}/,
|
41
|
+
preset: /\{presetId\}/,
|
42
|
+
price: /\{priceId\}/,
|
43
|
+
property_group: /\{propertyGroupId\}/,
|
44
|
+
property: /\{propertyId\}/,
|
45
|
+
referrer: /\{referrerId\}/,
|
46
|
+
reference_type: /\{referenceType\}/,
|
47
|
+
reference_value: /\{referenceValue\}/,
|
48
|
+
sales_price: /\{salesPriceId\}/,
|
49
|
+
shipping_profile: /\{shippingProfileId\}/,
|
50
|
+
shipping_package: /\{orderShippingPackageId\}/,
|
51
|
+
shipping_service_provider: /\{shippingServiceProviderID\}/,
|
52
|
+
sku: /\{skuId\}/,
|
53
|
+
type: /\{typeId\}/,
|
54
|
+
type_string: /\{type\}/,
|
55
|
+
unit: /\{unitId\}/,
|
56
|
+
value: /\{valueId\}/,
|
57
|
+
variation: /\{variationId\}/,
|
58
|
+
variation_supplier: /\{variationSupplierId\}/,
|
59
|
+
warehouse: /\{warehouseId\}/,
|
60
|
+
webstore: /\{webstoreId\}/
|
61
|
+
}
|
62
|
+
# Loop over the given argument symbols, retrieve the corresponding regex
|
63
|
+
# and replace the argument with the corresponding value.
|
64
|
+
arguments.each do |k, v|
|
65
|
+
api_endpoint_result.gsub!(endpoint_parameters.fetch(k), v.to_s)
|
66
|
+
end
|
67
|
+
|
68
|
+
api_endpoint_result
|
65
69
|
end
|
66
70
|
|
67
|
-
|
71
|
+
def routes
|
72
|
+
# Prints all available routes with their values in the given module
|
73
|
+
constants.each do |const|
|
74
|
+
puts "#{const}: \t #{const_get(const)}" if const.to_s.upcase!.nil?
|
75
|
+
end
|
76
|
+
end
|
68
77
|
end
|
69
78
|
|
70
|
-
def
|
71
|
-
|
72
|
-
constants.each do |const|
|
73
|
-
puts "#{const}: \t #{const_get(const)}" if const.to_s.upcase!.nil?
|
74
|
-
end
|
79
|
+
def self.included(base)
|
80
|
+
base.extend(ClassMethods)
|
75
81
|
end
|
76
82
|
end
|
77
83
|
end
|