livetext 0.8.20 → 0.8.21

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
  SHA1:
3
- metadata.gz: 14942962cca6d65aa53358a82edfe3db7f88ed38
4
- data.tar.gz: f637d4ac15de63dea8286e4599e01957a5b01da7
3
+ metadata.gz: b94a9cb09fc3f7a4657a1c6a135873706c90bfa6
4
+ data.tar.gz: a2f8d5b355563ba1966d82e4068be5979dc4a707
5
5
  SHA512:
6
- metadata.gz: cfdb4894a8a2550cdeb93233df666f6fb2db86d64dbb76097acd62ead557e48d11a2afff71481db32f58eda2b767c75e0631b3c0e8f0dcbeb8496ddf4fb52ec2
7
- data.tar.gz: e2a55481d63f55befe7de4babfd2589344963a61dee080f295cdb10ccebcdb98a139fbd346c8b0a221b3e32cd344741fa23a9b5efebc4ee8662727bef4ec2a48
6
+ metadata.gz: aaed795cc076f3d6e692e485bda8759ef3b3d2743dfd8ed7d139c7b1010d1e367be8e44451eb131b4eb7696bf86851c6c73bf567bb6a1ecc53c7497652e0ec10
7
+ data.tar.gz: 1f7330495ef44760d5fa6e98fd13924b6c71f621cbefb1f4216f2eba31f2034483261b46880b758beb9cfdf7e26bc3ba014d7e3b2fd596ad21124f5b46ba04a6
data/lib/functions.rb CHANGED
@@ -21,6 +21,12 @@ class Livetext::Functions # Functions will go here... user-def AND pre-def??
21
21
  Time.now.strftime("%T")
22
22
  end
23
23
 
24
+ def link
25
+ param = self.class.param
26
+ text, url = param.split("|", 2) # reverse these?
27
+ "<a href='#{url}'>#{text}</a>"
28
+ end
29
+
24
30
  def simple_format(*args)
25
31
  param = self.class.param
26
32
  param ||= "NO PARAMETER"
data/lib/livetext.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Livetext
2
- VERSION = "0.8.20"
2
+ VERSION = "0.8.21"
3
3
  end
4
4
 
5
5
  require 'fileutils'
data/lib/standard.rb CHANGED
@@ -283,4 +283,10 @@ module Livetext::Standard
283
283
  _puts "</table>"
284
284
  end
285
285
 
286
+ def link
287
+ url = _args.first
288
+ text = _args[2..-1].join(" ")
289
+ _puts "<a href='#{url}'>#{text}</a>"
290
+ end
291
+
286
292
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: livetext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.20
4
+ version: 0.8.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-12 00:00:00.000000000 Z
11
+ date: 2017-05-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A smart text processor extensible in Ruby
14
14
  email: rubyhacker@gmail.com