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 +4 -4
- data/lib/nrser/rspex.rb +23 -3
- data/lib/nrser/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2f2d4d8bf9243e750dd94962a0331985b7ec0ca
|
4
|
+
data.tar.gz: 55ae615d5733b4e183052cbe0afdc5cca39fd172
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
54
|
-
|
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
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.
|
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-
|
11
|
+
date: 2018-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|