unicode_math 1.0.0 → 1.1.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.
data/README.md CHANGED
@@ -51,6 +51,10 @@ You can raise to the powers of 0–9 as well as arbitrary numbers:
51
51
  21.÷ 7
52
52
  6.⟌ 24
53
53
 
54
+ ### Multiplication
55
+
56
+ 5.× 5
57
+
54
58
  ## Installation
55
59
 
56
60
  Add this line to your application's Gemfile:
@@ -0,0 +1,15 @@
1
+ # encoding: utf-8
2
+
3
+ module UnicodeMath
4
+ module Multiplication
5
+ def self.included(base)
6
+ base.class_eval do
7
+ define_method('×') do |multiplier|
8
+ self * multiplier
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
14
+
15
+ Numeric.send(:include, UnicodeMath::Multiplication)
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+
3
+ require 'spec_helper'
4
+
5
+ describe UnicodeMath::Multiplication do
6
+ it 'multiplies' do
7
+ expect(5.× 5).to eq(25)
8
+ end
9
+ end
data/unicode_math.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'unicode_math'
5
- gem.version = '1.0.0'
5
+ gem.version = '1.1.0'
6
6
 
7
7
  gem.author = 'Collective Idea'
8
8
  gem.email = 'info@collectiveidea.com'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicode_math
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-10 00:00:00.000000000 Z
12
+ date: 2012-10-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -60,6 +60,7 @@ files:
60
60
  - lib/unicode_math/division.rb
61
61
  - lib/unicode_math/exponents.rb
62
62
  - lib/unicode_math/fractions.rb
63
+ - lib/unicode_math/multiplication.rb
63
64
  - lib/unicode_math/roots.rb
64
65
  - lib/unicode_math/trigonometry.rb
65
66
  - spec/spec_helper.rb
@@ -68,6 +69,7 @@ files:
68
69
  - spec/unicode_math/division_spec.rb
69
70
  - spec/unicode_math/exponents_spec.rb
70
71
  - spec/unicode_math/fractions_spec.rb
72
+ - spec/unicode_math/multiplication_spec.rb
71
73
  - spec/unicode_math/root_spec.rb
72
74
  - spec/unicode_math/trigonometry_spec.rb
73
75
  - spec/unicode_math_spec.rb
@@ -86,7 +88,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
88
  version: '0'
87
89
  segments:
88
90
  - 0
89
- hash: -2467562498706085623
91
+ hash: 3615466882464385091
90
92
  required_rubygems_version: !ruby/object:Gem::Requirement
91
93
  none: false
92
94
  requirements:
@@ -95,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
97
  version: '0'
96
98
  segments:
97
99
  - 0
98
- hash: -2467562498706085623
100
+ hash: 3615466882464385091
99
101
  requirements: []
100
102
  rubyforge_project:
101
103
  rubygems_version: 1.8.24
@@ -109,6 +111,7 @@ test_files:
109
111
  - spec/unicode_math/division_spec.rb
110
112
  - spec/unicode_math/exponents_spec.rb
111
113
  - spec/unicode_math/fractions_spec.rb
114
+ - spec/unicode_math/multiplication_spec.rb
112
115
  - spec/unicode_math/root_spec.rb
113
116
  - spec/unicode_math/trigonometry_spec.rb
114
117
  - spec/unicode_math_spec.rb