saturday 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/bin/saturday ADDED
@@ -0,0 +1,2 @@
1
+ require 'saturday'
2
+ puts Saturday.dates(2012,3,4)
@@ -0,0 +1,12 @@
1
+ require 'date'
2
+ class Saturday::Dates
3
+ attr_accessor :date
4
+
5
+ def initialize(year,month,day)
6
+ @date = Date.new(year,month,day)
7
+ end
8
+
9
+ def month
10
+ @date.mon
11
+ end
12
+ end
data/lib/saturday.rb CHANGED
@@ -1,5 +1,8 @@
1
+ require 'saturday/dates'
1
2
  class Saturday
2
- def self.weekend
3
- puts "I love it!"
4
- end
5
- end
3
+ def self.dates(year,month,date)
4
+ date = Dates.new(year,month,date)
5
+ date.month
6
+ end
7
+
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saturday
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,13 +11,16 @@ bindir: bin
11
11
  cert_chain: []
12
12
  date: 2012-06-30 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: A Saturday gem
14
+ description: A Gem to find saturdays in a month
15
15
  email: ankit.gupta8898@gmail.com
16
- executables: []
16
+ executables:
17
+ - saturday
17
18
  extensions: []
18
19
  extra_rdoc_files: []
19
20
  files:
20
21
  - lib/saturday.rb
22
+ - lib/saturday/dates.rb
23
+ - bin/saturday
21
24
  homepage: http://rubygems.org/gems/saturday
22
25
  licenses: []
23
26
  post_install_message: