wheres_my_weekend 0.1.2 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab666043007754e05f9c54ca291f9b9fd2a68b21
4
- data.tar.gz: 8571700e805ab703fb5b0ff85df1bd4c9848c7ea
3
+ metadata.gz: 8630d37047ec101676156d0e88b4b1a49d98c1c0
4
+ data.tar.gz: e1bc7d4f05b386263096ff9f1ee0ab35bba85fa0
5
5
  SHA512:
6
- metadata.gz: 3a4aee1778541349678cab13fc8615c692ec547c836c3c482b2fe16c43deb2ae46f44fc6360ec18dae7e1226752433ed5a60252b84c4e0008601d0c332ff36fe
7
- data.tar.gz: 614077d55da243a69054af6a1a87351e01f11e705511bbd0d5dabb710d89dbd3f8a2edf841ef3f3f97edf2069a7303821aa38d7d21f54423d88e17a0894b23df
6
+ metadata.gz: 8d6e5b1ace3cc88c8d770451068254fc017da79f07cb2e42ef1d69bb728e564b084ef9cb17bb59be8359d67609817282cfd483c17fdaa778fddbc9cd9fb9f8b2
7
+ data.tar.gz: dbc862ef9354b393144bc956330c4c61b7c071bc8c8903f9efa70350161c6f9b6a6eb60c6aef67ac96a1439f566587539dcedd745329bb7a8c9a938d0f083ee0
data/README.md CHANGED
@@ -61,11 +61,12 @@ Time.new(2016, 12, 25).next_weekend
61
61
  # => [2016-12-31 00:00:00 -0200, 2017-01-01 00:00:00 -0200]
62
62
  ```
63
63
 
64
- ## Development
64
+ - `remove_weekends` will return a array of weekdays from a array of dates
65
65
 
66
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
67
-
68
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
66
+ ```ruby
67
+ [Time.new(2016, 12, 23), Time.new(2016, 12, 24), Time.new(2016, 12, 25)].weekend_dates
68
+ # => [2016-12-23 00:00:00 -0200]
69
+ ```
69
70
 
70
71
  ## Contributing
71
72
 
@@ -1,3 +1,3 @@
1
1
  module WheresMyWeekend
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.5'.freeze
3
3
  end
@@ -30,6 +30,10 @@ class Array
30
30
  def weekend_dates
31
31
  reject { |date| !date.weekend_day? }
32
32
  end
33
+
34
+ def remove_weekends
35
+ reject(&:weekend_day?)
36
+ end
33
37
  end
34
38
 
35
39
  class Integer
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wheres_my_weekend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Odinei Rocha
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-27 00:00:00.000000000 Z
11
+ date: 2017-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler