ruby-dita 0.3.2 → 0.4.0

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: db724e37465a97acf81e41a17a80354cd3a3f9d9
4
- data.tar.gz: 22993c8318907d247007eece6297747c4fd4dbc1
3
+ metadata.gz: 9b31fe843ec1265d42538563bb0d6e38c3205c21
4
+ data.tar.gz: 7b3fb9d11964629d60b8b577c9d4db082701ede3
5
5
  SHA512:
6
- metadata.gz: 6188dc563c41202342e0148c25880ca1cd9a3d78ad63fa0884ad7e2c3aace528d7d22105b08ebe0698b6a617be7190e98ea432b7a7f61994b83f975734a5fa29
7
- data.tar.gz: 0d458387a0b9280c5db0388d3ca55594efcb9365263b489841aa92c775b1dc413c185dde0475e0a54bdb362cd895f1411ac62e53f0557f2fe6c49475899bba94
6
+ metadata.gz: b9ecb295ae85435499615c73045c415af583ddec3b0d79b53e580123dd09aaef61d332019456f821143dced11906317a7605db5975b28f576f67fbbe124ae691
7
+ data.tar.gz: 63ce68f646a65fd71be9b7b950f4364dabcb724661d68c92d1628b1a561a2f91fdfe024b53f458e3242e64184b697f5aba5b38702186e988fa0187fc5f29f08b
@@ -5,7 +5,7 @@ module Dita
5
5
  # @param column_info [Array, Hash] if Array of Strings, column headings; if Array of Elements, colspecs; if Hash, keys are strings for column headings; values are <colspec> elements
6
6
  # @param rows [Array] array of rows with which to populate table; can either be XML <row> elements or Strings representing values
7
7
  # @return [Element] valid Dita <table>
8
- def self.table(column_info, rows=[])
8
+ def table(column_info, rows=[])
9
9
  t = Element.new('table')
10
10
  headings = []
11
11
  case column_info
@@ -34,7 +34,7 @@ module Dita
34
34
 
35
35
  # @param ary [Array] array of row entries or entry values
36
36
  # @return [Element] correctly formatted row
37
- def self.row(ary)
37
+ def row(ary)
38
38
  return ary if ary.all? do |a| a.respond_to?(:name) and a.name == 'row' end
39
39
  Element.new('row') <<
40
40
  ary.collect do |entry|
@@ -6,7 +6,7 @@ module Dita
6
6
  # @param title [String, Element] string or XML rich-text
7
7
  # @param content [Array] optional topic body content in array form
8
8
  # @return [Element] valid Dita <topic>
9
- def self.topic(title, content=nil)
9
+ def topic(title, content=nil)
10
10
  t = Element.new('topic')
11
11
  t[:id] = "topic#{t.object_id.to_s}"
12
12
  t << Element.new('title', [title])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-dita
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Kong
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-21 00:00:00.000000000 Z
11
+ date: 2016-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: duxml