method_object 0.1.1 → 1.0.0

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
- SHA1:
3
- metadata.gz: 1bfe8995eec3e81eaefbb5ecb602df64a8b245ac
4
- data.tar.gz: d47526095a680c8b3541c26d4aa3ca44e1293813
2
+ SHA256:
3
+ metadata.gz: 3b6cfbf7d4687cd268dadbd876eb81148740f126d2f30d1ecc925df05572e263
4
+ data.tar.gz: 003b2f8abf57ee1aa073e5715b318016e1597053b31a6d540b41627838e813d6
5
5
  SHA512:
6
- metadata.gz: e7fab229d72852bb1a9d53995537c03f2d70b1a549eba1473fe909897fe14165d237aca12021a5ccf41df3db244328b1b455a8129ce716d96213a86bece5f5a8
7
- data.tar.gz: 923bb884354b0dfb5ddc2f9cb33b6b15df12480e37ca6d143b93f6f696a4cbc3ff32f5240a8c179033611a07f742e978695bea1dd4e5f6a3743a8143165618da
6
+ metadata.gz: 42177284d72db7f0f4888c3a4d42af7f96d7d6ddc0e6a85c7b9926c07b7c34fe511f194ab775da2145fed1a3dd50420e20499554181d42e08a13d73ca43c6ab1
7
+ data.tar.gz: b56eabe3a2f69cfd845ea74e2ea8b7304f494ad3bdf8d4408d0f31228fa27abd57bab72f0e9581c0fe0644ec0a6fe8f71c39768df2cfe57d218f9025908112b8
data/README.md CHANGED
@@ -1,43 +1,169 @@
1
1
  # MethodObject
2
2
 
3
- MethodObject is a simple class for facilitating the method object pattern.
3
+ [![Version](https://img.shields.io/gem/v/method_object)](https://github.com/bukowskis/method_object.svg/releases)
4
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/bukowskis/method_object/blob/master/LICENSE.md)
5
+ [![Build Status](https://circleci.com/gh/bukowskis/method_object.svg?style=shield)](https://circleci.com/gh/bukowskis/method_object)
6
+ [![Maintainability](https://api.codeclimate.com/v1/badges/55b133b2c8e1a9649d88/maintainability)](https://codeclimate.com/repos/5c8032b7c1be5c599400eedd/maintainability)
4
7
 
5
- You can think of a MethodObject as a proc with the power of a class. Define methods, use instance variables, etc.
8
+ ### TL; DR
6
9
 
7
- ## Installation
10
+ The [method object pattern](https://refactoring.guru/replace-method-with-method-object) implies that you have one Ruby class for one single thing you want to perform.
11
+
12
+ This gem helps you to do just that with minimal overhead. The convention is to use the `.call` class method like so:
13
+
14
+ ```ruby
15
+ class SaySometing
16
+ include MethodObject
17
+
18
+ # Input
19
+ option :text
20
+
21
+ # Output
22
+ def call
23
+ puts text
24
+ end
25
+ end
8
26
 
9
- Add this line to your application's Gemfile:
27
+ SaySometihng.call(text: 'Hi there!') # => 'Hi there!'
28
+ ```
10
29
 
11
- gem 'method_object'
30
+ ## Rationale
12
31
 
13
- And then execute:
32
+ A minimal implementation of the method object pattern would probably look [like this](https://github.com/deadlyicon/method_object/blob/16944f7088bbe4d9e0039688077b91fdd4adcdbd/lib/method_object.rb). This is sometimes also referred to as "service class".
14
33
 
15
- $ bundle
34
+ ```ruby
35
+ class SaySometing
36
+ def self.call(*args, &block)
37
+ new.call(*args, &block)
38
+ end
39
+
40
+ def call(text)
41
+ puts text
42
+ end
43
+ end
44
+ ```
16
45
 
17
- Or install it yourself as:
46
+ > Fun fact: [previously](https://github.com/deadlyicon/method_object/issues/3) that was actually the implementation of this gem.
18
47
 
19
- $ gem install method_object
48
+ Basically everything passed to `MyClass.call(...)` would be passed on to `MyClass.new.call(...)`.
20
49
 
21
- ## Usage
50
+ Even better still, it *should* be passed on to `MyClass.new(...).call` so that your implementation becomes cleaner:
22
51
 
23
52
  ```ruby
24
- class OpenDoor < MethodObject
25
- def call door
26
- open_door!(door)
27
- end
53
+ class SaySometing
54
+ def self.call(*args, &block)
55
+ new(*args, &block).call
56
+ end
57
+
58
+ def initialize(text:)
59
+ @text = text
60
+ end
61
+
62
+ def call
63
+ puts @text
64
+ end
65
+ end
66
+ ```
67
+
68
+
69
+ People [implemented that](https://github.com/LIQIDTechnology/methodobject/blob/89ba022d61ac6037564cc1056c00813375a2d3ae/lib/method_object.rb#L73-L75), but in doing so reinvented the wheel. Because now you not only have the method object pattern (i.e. `call`), now you also have to deal with initialization (i.e. `new`).
70
+
71
+ That's where the popular [dry-initializer](https://dry-rb.org/gems/dry-initializer) gem comes in. It is a battle-tested way to initialize objects with mandatory and optional attributes.
28
72
 
29
- def open_door!(door)
30
- door.open
31
- end
73
+ The `method_object` gem (you're looking at it right now), combines both the method object pattern and dry initialization.
74
+
75
+ ## Installation
76
+
77
+ ```
78
+ # Add this to your Gemfile
79
+ gem 'method_object`
80
+ ```
81
+
82
+ ## Usage
83
+
84
+ If you only have one mandatory, obvious argument, this is what your implementation most likely would look like:
85
+
86
+ ```ruby
87
+ class CalculateTax
88
+ include MethodObject
89
+
90
+ param :product
91
+
92
+ def call
93
+ product.price * 0.1
32
94
  end
95
+ end
33
96
 
34
- OpenDoor.call(my_door)
97
+ bike = Bike.new(price: 50)
98
+ CalculateTax.call(bike) # => 5
35
99
  ```
36
100
 
37
- # Contributing
101
+ If you prefer to use named keywords, use this instead:
102
+
103
+ ````ruby
104
+ class CalculateTax
105
+ include MethodObject
106
+
107
+ option :product
108
+
109
+ def call
110
+ product.price * 0.1
111
+ end
112
+ end
113
+
114
+ bike = Bike.new(price: 50)
115
+ CalculateTax.call(product: bike) # => 5
116
+ ````
117
+
118
+ You can also use both params and options. They are all mandatory.
119
+
120
+ ````ruby
121
+ class CalculateTax
122
+ include MethodObject
123
+
124
+ param :product
125
+ option :dutyfree
126
+
127
+ def call
128
+ return 0 if dutyfree
129
+ product.price * 0.1
130
+ end
131
+ end
132
+
133
+ bike = Bike.new(price: 50)
134
+ CalculateTax.call(bike, dutyfree: true) # => 0
135
+ ````
136
+
137
+ You can make options optional by defining a default value in a proc:
138
+
139
+ ````ruby
140
+ class CalculateTax
141
+ include MethodObject
142
+
143
+ param :product
144
+ option :dutyfree, default: -> { false }
145
+
146
+ def call
147
+ return 0 if dutyfree
148
+ product.price * 0.1
149
+ end
150
+ end
151
+
152
+ bike = Bike.new(price: 50)
153
+ CalculateTax.call(bike) # => 5
154
+ ````
155
+
156
+ That's it!
157
+
158
+ # Caveats
159
+
160
+ * `params` cannot be optional (or have default values). This is because there can be several params in a row, which leads to confusion when they are optional.
161
+
162
+ # Thanks
163
+
164
+ * A big thank you to [Jared](https://github.com/deadlyicon) who was so kind to give us the `method_object` gem name for our implementation.
165
+ * The [dry-rb](https://dry-rb.org/) team for their sense of beauty.
166
+
167
+ # License
38
168
 
39
- 1. Fork it
40
- 2. Create your feature branch (`git checkout -b my-new-feature`)
41
- 3. Commit your changes (`git commit -am 'Added some feature'`)
42
- 4. Push to the branch (`git push origin my-new-feature`)
43
- 5. Create new Pull Request
169
+ MIT License, see [LICENSE.md](https://github.com/bukowskis/method_object/blob/master/LICENSE.md)
@@ -1,21 +1,51 @@
1
- class MethodObject
1
+ require 'dry-initializer'
2
2
 
3
- VERSION = '0.1.1'
3
+ module MethodObject
4
+ def self.included(base)
5
+ base.extend Dry::Initializer
6
+ base.extend ClassMethods
7
+ base.send(:private_class_method, :new)
8
+ end
9
+
10
+ module ClassMethods
11
+ def call(*args, &block)
12
+ __check_for_unknown_options(*args)
13
+ new(*args).call(&block)
14
+ end
4
15
 
5
- class << self
6
- private :new
16
+ # Because of the positioning of multiple params, params can never be omitted.
17
+ def param(name, type = nil, **opts, &block)
18
+ raise ArgumentError, "Default value for param not allowed - #{name}" if opts.key? :default
19
+ raise ArgumentError, "Optional params not supported - #{name}" if opts.fetch(:optional, false)
7
20
 
8
- def call *args, &block
9
- new.call(*args, &block)
21
+ dry_initializer.param(name, type, **opts, &block)
22
+ self
10
23
  end
11
24
 
12
- def to_proc
13
- method(:call).to_proc
25
+ # DEPRECATED
26
+ def assign(variable, to:)
27
+ warn 'MethodObject.assign is deprecated. ' \
28
+ "Please use this instead: `option #{variable.inspect}, default: ...`"
29
+ option variable, default: to
14
30
  end
15
- end
16
31
 
17
- def call
18
- raise "#{self.class}#call is not defined"
19
- end
32
+ def __check_for_unknown_options(*args)
33
+ return if __defined_options.empty?
34
+
35
+ opts = args.drop(__defined_params.length).first || {}
36
+ raise ArgumentError, "Unexpected argument #{opts}" unless opts.is_a? Hash
20
37
 
38
+ unknown_options = opts.keys - __defined_options
39
+ message = "Key(s) #{unknown_options} not found in #{__defined_options}"
40
+ raise KeyError, message if unknown_options.any?
41
+ end
42
+
43
+ def __defined_options
44
+ dry_initializer.options.map(&:source)
45
+ end
46
+
47
+ def __defined_params
48
+ dry_initializer.params.map(&:source)
49
+ end
50
+ end
21
51
  end
@@ -1,71 +1,97 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe MethodObject do
3
+ class MinimalMethodObject
4
+ include MethodObject
4
5
 
5
- let(:block) { ->{} }
6
+ option :color
6
7
 
7
- class SimpleMethodObject < MethodObject
8
- def call *args, &block
9
- [args, block]
10
- end
8
+ def call
9
+ "The color is #{color}"
11
10
  end
11
+ end
12
+
13
+ class ExampleMethodObject
14
+ include MethodObject
12
15
 
13
- class SimpleMethodObjectWithNoCallMethod < MethodObject
16
+ param :shape
17
+ option :color
18
+ option :size, default: -> { :big }
19
+
20
+ def call
21
+ block_given? ? yield(to_s) : to_s
14
22
  end
15
23
 
16
- shared_examples 'a method object' do
17
- describe '.new' do
18
- it 'should be private' do
19
- expect(subject.private_methods).to include :new
24
+ def to_s
25
+ "#{size} #{color} #{shape}"
26
+ end
27
+ end
28
+
29
+ RSpec.describe MethodObject do
30
+ describe '.param' do
31
+ context 'when defining a default value' do
32
+ it 'raises an error' do
33
+ expect do
34
+ Class.new do
35
+ include MethodObject
36
+
37
+ param :shape, default: -> { :square }
38
+ end
39
+ end.to raise_error ArgumentError, /not allowed/
20
40
  end
21
41
  end
22
- describe '.to_proc' do
23
- it 'should return a proc that calls call' do
24
- expect(subject.to_proc).to be_a Proc
25
- expect(subject).to receive(:call).with(:a,:b)
26
- subject.to_proc.(:a, :b)
42
+
43
+ context 'when defined as optional' do
44
+ it 'raises an error' do
45
+ expect do
46
+ Class.new do
47
+ include MethodObject
48
+
49
+ param :user, optional: true
50
+ end
51
+ end.to raise_error ArgumentError, /not supported/
27
52
  end
28
53
  end
29
- end
30
54
 
31
-
32
- describe SimpleMethodObjectWithNoCallMethod do
33
- subject{ SimpleMethodObjectWithNoCallMethod }
34
- it_behaves_like 'a method object'
35
- describe '.call' do
36
- it 'should raise a SimpleMethodObjectWithNoCallMethod#call is not defined error' do
37
- expect{ subject.call }.to raise_error StandardError, "SimpleMethodObjectWithNoCallMethod#call is not defined"
55
+ context 'when properly defined' do
56
+ it 'is mandatory' do
57
+ expect do
58
+ ExampleMethodObject.call
59
+ end.to raise_error ArgumentError, /wrong number of arguments/
38
60
  end
39
61
  end
40
62
  end
41
63
 
42
- describe SimpleMethodObject do
43
- subject{ SimpleMethodObject }
44
- it_behaves_like 'a method object'
45
- it "should curry all args and block to #call" do
46
- expect( subject.call(1,2,3, &block) ).to eq [[1,2,3], block]
47
- expect( subject.to_proc.call(1,2,3, &block) ).to eq [[1,2,3], block]
64
+ describe '.call' do
65
+ context 'without block' do
66
+ it 'has access to options' do
67
+ result = MinimalMethodObject.call color: 'blue'
68
+
69
+ expect(result).to eq 'The color is blue'
70
+ end
48
71
  end
49
- end
50
72
 
51
- describe 'used as a block' do
52
- it 'should work' do
53
- expect( [1,2,3].map(&SimpleMethodObject) ).to eq [
54
- [[1], nil],
55
- [[2], nil],
56
- [[3], nil],
57
- ]
73
+ context 'with block' do
74
+ it 'passes the block' do
75
+ result = ExampleMethodObject.call('circle', color: 'blue', &:upcase)
76
+
77
+ expect(result).to eq 'BIG BLUE CIRCLE'
78
+ end
58
79
  end
59
- end
60
80
 
61
- describe 'used to define a method' do
62
- it 'should work' do
63
- _class = Class.new do
64
- define_method :foo, &SimpleMethodObject
81
+ context 'with unknown options' do
82
+ it 'raises an error' do
83
+ expect do
84
+ ExampleMethodObject.call 'square', color: 'red', ability: 'Totally invalid'
85
+ end.to raise_error KeyError, 'Key(s) [:ability] not found in [:color, :size]'
65
86
  end
87
+ end
66
88
 
67
- expect( _class.new.foo('hello', :world, &block) ).to eq [['hello', :world], block]
89
+ context 'without options' do
90
+ it 'raises an error' do
91
+ expect do
92
+ ExampleMethodObject.call 'square', 'boom!'
93
+ end.to raise_error ArgumentError, 'Unexpected argument boom!'
94
+ end
68
95
  end
69
96
  end
70
-
71
97
  end
@@ -1,19 +1,14 @@
1
+ require 'bundler/setup'
1
2
  require 'method_object'
2
- require 'pry'
3
- # This file was generated by the `rspec --init` command. Conventionally, all
4
- # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
5
- # Require this file using `require "spec_helper"` to ensure that it is only
6
- # loaded once.
7
- #
8
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
3
+
9
4
  RSpec.configure do |config|
10
- config.treat_symbols_as_metadata_keys_with_true_values = true
11
- config.run_all_when_everything_filtered = true
12
- config.filter_run :focus
5
+ # Enable flags like --only-failures and --next-failure
6
+ config.example_status_persistence_file_path = '.rspec_status'
7
+
8
+ # Disable RSpec exposing methods globally on `Module` and `main`
9
+ config.disable_monkey_patching!
13
10
 
14
- # Run specs in random order to surface order dependencies. If you find an
15
- # order dependency and want to debug it, you can fix the order by providing
16
- # the seed, which is printed after each run.
17
- # --seed 1234
18
- config.order = 'random'
11
+ config.expect_with :rspec do |c|
12
+ c.syntax = :expect
13
+ end
19
14
  end
metadata CHANGED
@@ -1,90 +1,96 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: method_object
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
- - Jared Grippe
7
+ - Bukowskis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-19 00:00:00.000000000 Z
11
+ date: 2019-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
14
+ name: dry-initializer
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec-core
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
20
34
  type: :development
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
- - - ~>
38
+ - - ">="
25
39
  - !ruby/object:Gem::Version
26
- version: '1.3'
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
- name: rake
42
+ name: rspec-expectations
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
- - - '>='
45
+ - - ">="
32
46
  - !ruby/object:Gem::Version
33
47
  version: '0'
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
- - - '>='
52
+ - - ">="
39
53
  - !ruby/object:Gem::Version
40
54
  version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
- name: rspec
56
+ name: rubocop
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - '>='
59
+ - - ">="
46
60
  - !ruby/object:Gem::Version
47
61
  version: '0'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - '>='
66
+ - - ">="
53
67
  - !ruby/object:Gem::Version
54
68
  version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
- name: pry-debugger
70
+ name: rubocop-rspec
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - '>='
73
+ - - ">="
60
74
  - !ruby/object:Gem::Version
61
75
  version: '0'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - '>='
80
+ - - ">="
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0'
69
- description: wraps up the method object pattern into a class
70
- email:
71
- - jared@deadlyicon.com
83
+ description:
84
+ email:
72
85
  executables: []
73
86
  extensions: []
74
87
  extra_rdoc_files: []
75
88
  files:
76
- - .gitignore
77
- - .rspec
78
- - .travis.yml
79
- - Gemfile
80
- - LICENSE
81
89
  - README.md
82
- - Rakefile
83
90
  - lib/method_object.rb
84
- - method_object.gemspec
85
91
  - spec/method_object_spec.rb
86
92
  - spec/spec_helper.rb
87
- homepage: https://github.com/deadlyicon/method_object
93
+ homepage: https://github.com/bukowskis/method_object
88
94
  licenses:
89
95
  - MIT
90
96
  metadata: {}
@@ -94,20 +100,19 @@ require_paths:
94
100
  - lib
95
101
  required_ruby_version: !ruby/object:Gem::Requirement
96
102
  requirements:
97
- - - '>='
103
+ - - ">="
98
104
  - !ruby/object:Gem::Version
99
105
  version: '0'
100
106
  required_rubygems_version: !ruby/object:Gem::Requirement
101
107
  requirements:
102
- - - '>='
108
+ - - ">="
103
109
  - !ruby/object:Gem::Version
104
110
  version: '0'
105
111
  requirements: []
106
- rubyforge_project:
107
- rubygems_version: 2.1.10
112
+ rubygems_version: 3.0.6
108
113
  signing_key:
109
114
  specification_version: 4
110
- summary: wraps up the method object pattern into a class
115
+ summary: Combining the method object pattern with DRY initialization
111
116
  test_files:
112
- - spec/method_object_spec.rb
113
117
  - spec/spec_helper.rb
118
+ - spec/method_object_spec.rb
data/.gitignore DELETED
@@ -1,17 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --format progress
@@ -1,12 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.0.0
4
- - 1.9.3
5
- - 1.9.2
6
- - jruby-18mode
7
- - jruby-19mode
8
- - rbx-2.1.1
9
- - ruby-head
10
- - jruby-head
11
- - 1.8.7
12
- - ree
data/Gemfile DELETED
@@ -1,3 +0,0 @@
1
- source 'http://rubygems.org'
2
-
3
- gemspec
data/LICENSE DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2012 Jared Grippe
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env rake
2
- require "bundler/gem_tasks"
3
-
4
- task :test do
5
- exec 'bundle exec rspec'
6
- end
7
-
8
- task :default => :test
@@ -1,25 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'method_object'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "method_object"
8
- spec.version = MethodObject::VERSION
9
- spec.authors = ["Jared Grippe"]
10
- spec.email = ["jared@deadlyicon.com"]
11
- spec.description = %q{wraps up the method object pattern into a class}
12
- spec.summary = %q{wraps up the method object pattern into a class}
13
- spec.homepage = "https://github.com/deadlyicon/method_object"
14
- spec.license = "MIT"
15
-
16
- spec.files = `git ls-files`.split($/)
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
20
-
21
- spec.add_development_dependency "bundler", "~> 1.3"
22
- spec.add_development_dependency "rake"
23
- spec.add_development_dependency 'rspec'
24
- spec.add_development_dependency 'pry-debugger'
25
- end