active_builder 1.0.0
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 +7 -0
- data/lib/active_buider.rb +18 -0
- metadata +43 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 97c97a75a608a809bdec48ac51c58f51eb0dbe323d42c2bb787260ef2c6693a7
|
4
|
+
data.tar.gz: 07c1d0a5970dd4e596000f90bc8ac7017e02ba979e828cf7e90bdb7e9dfb05f4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bb3f4b6bbc70c8c19f13ff7964e77baa58cd12597a07f46a6ace507f84bae8f871d894451dd727b57b6b4fe72d1a2a1128e83bbf995a6a02a825a37ead6ae492
|
7
|
+
data.tar.gz: 6b69a7ee51124802d1ae18beef4a79df3aaea776319eeb179296f7ecb9c6aa3fb860f6e801eb11edf8f22d714462cfd7cb5777369540334a0c7969de1a2ecd36
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ActiveBuilder
|
4
|
+
module ClassMethod
|
5
|
+
def attributes(attribute)
|
6
|
+
attr_accessor attribute
|
7
|
+
method_name = "with_#{attribute}".to_sym
|
8
|
+
define_method(method_name) do |value|
|
9
|
+
send("#{attribute}=", value)
|
10
|
+
self
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.included(klass)
|
16
|
+
klass.extend ClassMethod
|
17
|
+
end
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: active_builder
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Philip Lambok
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-11-23 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: A simple builder gem to cleaning up your parameters
|
14
|
+
email: philiplambok@gmail.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/active_buider.rb
|
20
|
+
homepage:
|
21
|
+
licenses:
|
22
|
+
- MIT
|
23
|
+
metadata: {}
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ">="
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
requirements: []
|
39
|
+
rubygems_version: 3.0.3
|
40
|
+
signing_key:
|
41
|
+
specification_version: 4
|
42
|
+
summary: Library to cleaning up your params
|
43
|
+
test_files: []
|