livetext 0.9.62 → 0.9.63

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61c11b22070e565c5c25735ea1134d58249a5f441f0ed3c1f9eeb0f8bbf7c628
4
- data.tar.gz: feff45c934b1ecb8757dcd1ea3fad4947e7383063faa9f3f68506dc73c99ff9e
3
+ metadata.gz: bb39ca81affae7c276e894251b5d69c330a17245c2f364c1fa0841d24e5debba
4
+ data.tar.gz: fbbf80f992676e11185b7c498161763e38caf77dee3bddac4de256d729455334
5
5
  SHA512:
6
- metadata.gz: 6e9fa6aeec991337d703e223f20daef4b65b0d261be3cdcfbce99854ab263c0660e2288de725411ba3eaa29c1e8e65ae421dddd433c187e813b10b052f658f1b
7
- data.tar.gz: f899d4de12921521b8d06adb35d10ed1f530cab3f9bc1d8c665ddb9bd7eb54b397d6bf7bc0a8686ecdfbd71a9aba18b470da0da38f2687d09ca03ba662b30f7b
6
+ metadata.gz: 72b78214a3b7b0e9f3653382500374af525c2b5bc0ce606c0cf11fb935b9eb8b4252d485796359e27d65dd1f1d1d1017ee43e71681c0b56d94db686c7953a547
7
+ data.tar.gz: 4ca59582edf8676cb9265f82ddaec1cd921ee572016e28a4c11b2db522c977a85ae06c233f065c11c5287a126e6a8c29a5b1699450bd808505a87efc62be1018
@@ -20,6 +20,11 @@ class Livetext::Functions
20
20
  @vars = nil
21
21
  end
22
22
 
23
+ # Simple method to access the class variable
24
+ def api
25
+ self.class.api
26
+ end
27
+
23
28
  # Helper method to access variables with fallback to global Livetext::Vars
24
29
  def get_var(name)
25
30
  return @vars.get(name) if @vars
@@ -2,5 +2,5 @@
2
2
  # Defining VERSION
3
3
 
4
4
  class Livetext
5
- VERSION = "0.9.62"
5
+ VERSION = "0.9.63"
6
6
  end
@@ -31,8 +31,8 @@ class TestFunctionAPIAccess < Minitest::Test
31
31
  Livetext::Functions.class_eval do
32
32
  def test_asset_function(param)
33
33
  # This mimics the asset function from Scriptorium that needs api.vars
34
- vname = self.class.api.vars.to_h[:View]
35
- postid = self.class.api.vars.to_h[:"post.id"]
34
+ vname = api.vars.to_h[:View]
35
+ postid = api.vars.to_h[:"post.id"]
36
36
  "view=#{vname}, post=#{postid}, file=#{param}"
37
37
  end
38
38
  end
@@ -47,8 +47,8 @@ class TestFunctionAPIAccess < Minitest::Test
47
47
  # Define a function that needs access to api.vars but takes no parameters
48
48
  Livetext::Functions.class_eval do
49
49
  def test_view_info
50
- vname = self.class.api.vars.to_h[:View]
51
- postid = self.class.api.vars.to_h[:"post.id"]
50
+ vname = api.vars.to_h[:View]
51
+ postid = api.vars.to_h[:"post.id"]
52
52
  "view=#{vname}, post=#{postid}"
53
53
  end
54
54
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: livetext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.62
4
+ version: 0.9.63
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton