nrser 0.1.0 → 0.1.1

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
2
  SHA1:
3
- metadata.gz: b087fa91e207a8859fdcf2335e50bc2dc8661fb8
4
- data.tar.gz: 6a0edb30a2236bde01044c9de2189edc7f42bac3
3
+ metadata.gz: e2f2d4d8bf9243e750dd94962a0331985b7ec0ca
4
+ data.tar.gz: 55ae615d5733b4e183052cbe0afdc5cca39fd172
5
5
  SHA512:
6
- metadata.gz: a8f5e75698179ea8beac5a4e40fe6f52f006817646fc6c47cc04c6b505e144e0b07066023ad547c49d0d9c3eea52bda2520816b9b9ed2bd15373cd55cd92aad0
7
- data.tar.gz: 8a2e9a4b5deee46c2c9e5f34142618b1148ed5ae23ba1cdceb8e573e7ec5575c7e96c24ba62fe2ad3188be3618aa0922cbebb4810c2344dd9ce99c619a72ed8b
6
+ metadata.gz: 740ca5dd0ada05a5adb259c13f1e2ca5150308b26686f0ffa8d63e399ad748d5c36beea986623bea9884a1fdcdd690f4bce7d03e3b8cd124b615f3f99b11b860
7
+ data.tar.gz: 43421a77de4da50eb540cc1055e7a732f47b4a058af81898a63da68737b8a4bbe3c8d715d021d9d325580c8d623ffd8d2919fe39a9dd52826a8b458441c71a83
data/lib/nrser/rspex.rb CHANGED
@@ -50,8 +50,24 @@ end
50
50
 
51
51
  class Wrapper
52
52
  def initialize description: nil, &block
53
- @description = description
54
- @block = block
53
+ case description
54
+ when Symbol
55
+ @description = description.to_s
56
+
57
+ if block
58
+ raise ArgumentError,
59
+ "Don't provide block with symbol"
60
+ end
61
+
62
+ if @description.start_with? '@'
63
+ @block = Proc.new { instance_variable_get description }
64
+ else
65
+ @block = description.to_proc
66
+ end
67
+ else
68
+ @description = description
69
+ @block = block
70
+ end
55
71
  end
56
72
 
57
73
  def unwrap context: nil
@@ -69,6 +85,10 @@ class Wrapper
69
85
  "#<Wrapper ?>"
70
86
  end
71
87
  end
88
+
89
+ def inspect
90
+ to_s
91
+ end
72
92
  end
73
93
 
74
94
  def wrap description = nil, &block
@@ -114,7 +134,7 @@ module NRSER::RSpex
114
134
  PREFIXES_BASE = {
115
135
  section: '§',
116
136
  group: '•',
117
- invocation: '⟮⟯',
137
+ invocation: '𝑓⟮𝑥⟯',
118
138
  }
119
139
 
120
140
  PREFIXES_MATH_ITALIC = PREFIXES_BASE.merge(
data/lib/nrser/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module NRSER
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
 
4
4
  module Version
5
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nrser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - nrser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-09 00:00:00.000000000 Z
11
+ date: 2018-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler