24point 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.md +19 -0
  2. data/lib/24point/base.rb +1 -0
  3. metadata +5 -5
  4. data/LICENSE +0 -0
  5. data/README +0 -0
data/README.md ADDED
@@ -0,0 +1,19 @@
1
+ ## 24Point
2
+
3
+ ## Requirements
4
+
5
+ * Ruby >= 1.9.3
6
+
7
+ ##Usage
8
+
9
+ ```bash
10
+ gem install 24point
11
+
12
+ ```
13
+ ```ruby
14
+ require '24point'
15
+ game = TfPointClass.new(1, 2, 3, 4)
16
+ puts game.result #=> 4*((2+1)+3),4*2*1*3...
17
+ ```
18
+
19
+
data/lib/24point/base.rb CHANGED
@@ -17,6 +17,7 @@ class TfPointClass
17
17
  end
18
18
 
19
19
  def result
20
+ return all_expression if all_expression != []
20
21
  given_numbers.permutation.to_a.uniq.each do |given_number|
21
22
  @number = given_number
22
23
  @expression = given_number.collect{|number| number.to_s}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: 24point
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -16,11 +16,10 @@ email: joyhu8023danny@gmail.com
16
16
  executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files:
19
- - README
19
+ - README.md
20
20
  files:
21
21
  - COPYING
22
- - LICENSE
23
- - README
22
+ - README.md
24
23
  - Rakefile
25
24
  - spec/24point/calculate_spec.rb
26
25
  - spec/24point/string_spec.rb
@@ -33,7 +32,8 @@ files:
33
32
  - lib/24point.rb
34
33
  - resources/defaults.yaml
35
34
  homepage: https://github.com/huyong36/24point
36
- licenses: []
35
+ licenses:
36
+ - MIT
37
37
  post_install_message:
38
38
  rdoc_options: []
39
39
  require_paths:
data/LICENSE DELETED
File without changes
data/README DELETED
File without changes