plot 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/plot/mark.rb +14 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a4c9cdff5e430e39848b1a600059bdc6bef528f2f7b8e0d845ff881106d5243
4
- data.tar.gz: fa8897e7299c937e101d56be0b344003effc4982249ac1ce89ff41b20dcf7678
3
+ metadata.gz: 52d7e627ba05b46d6406679d44e071eb63762d9bdc4a8904883b4bffa4cb23e1
4
+ data.tar.gz: a475675aad7a4930ad021ae74f748879d4cd6464142c4accff94cd52cabe7041
5
5
  SHA512:
6
- metadata.gz: 9a99e59876e00212709b71de99dbf47f8cf4ea197576bbb8d7c8f2e3fad8660088c346462f163de0906039dc130bfff3304db0359d57c50fdecf4828a5773602
7
- data.tar.gz: 80c74daa800b0a80b7235238c43e0a825943564c04522e89dcec6d80236baf64c2406df24f1247ca0d41d3a15fdcc4fa337759d8c3b3750718c2e73ceb64f21c
6
+ metadata.gz: 974a4403d5a7c3e4f98c63e7d85b3bfeb612671177f89080abbc912b6d1f12633754a1943e881fba6245dc89e08b984852c28ac6915f1b9cd313ae5a254b653d
7
+ data.tar.gz: 3ba284e6c02b47d58df65c476500b1673ec5a5fa316746e58e2ac6de463a731bc254f2e785e59f3855e632dc225e0b9dcad969fa7cdbbed774150b3cff83c6b3
data/lib/plot/mark.rb CHANGED
@@ -6,15 +6,25 @@ class Plot::MarkProxy
6
6
 
7
7
  def channel(name, value, **obj)
8
8
  # TODO: add checking if option is a channel
9
- obj[:value] = value
10
- @mark.add_option(name, obj)
9
+
10
+ if !obj.blank?
11
+ obj[:value] = value
12
+ @mark.add_option(name, obj)
13
+ else
14
+ @mark.add_option(name, value)
15
+ end
11
16
  end
12
17
 
13
- def option(name, value)
18
+ def option(name, value, wrap: false)
14
19
  if(value.class == Proc || [:title, :href, :ariaLabel].include?(name)) then
15
20
  raise "A channel should be used in place of option"
16
21
  end
17
- @mark.add_option(name, { value: value })
22
+
23
+ if wrap then
24
+ @mark.add_option(name, { value: value })
25
+ else
26
+ @mark.add_option(name, value )
27
+ end
18
28
  end
19
29
 
20
30
  def style(name, value)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reese Armstrong