html_slice 0.2.4 → 0.2.5
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 +4 -4
- data/lib/html_slice/version.rb +1 -1
- data/lib/html_slice.rb +10 -0
- metadata +7 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 15e5d2ae2bdf50596a619f5fd7a4252146b749ee9c51606741c96cfc49bab2d0
|
|
4
|
+
data.tar.gz: ed9d95769f41c8cfc8193ae6c21cfcd02619bb67c54170757e7a5e7ed8f2ea23
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ab59522b9c479992f00386c9b93a77ffd7322e89a9a91f2a9faa2a4ec0c5fd30705e513b13f65b51de6d023f6a0631d6c03cb2165e9d50de51dd15f56d19cb84
|
|
7
|
+
data.tar.gz: 57a60eefdf900156c4e34c15557e2468f26c3482644669200aee1ebda6a0dcf26cb59437a8a647ea40db70bd352ffe611327347fd62ab25fe68f3c85916fa5bc
|
data/lib/html_slice/version.rb
CHANGED
data/lib/html_slice.rb
CHANGED
|
@@ -23,6 +23,16 @@ module HtmlSlice
|
|
|
23
23
|
DEFAULT_SLICE = :default
|
|
24
24
|
ATTRIBUTE_CACHE = {}
|
|
25
25
|
|
|
26
|
+
def self.slice(slice_id = DEFAULT_SLICE, wrap: ["", ""], &block)
|
|
27
|
+
@class ||= Class.new { include HtmlSlice }.new
|
|
28
|
+
@class.html_slice(slice_id, wrap: wrap, &block)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def self.layout(slice_id = DEFAULT_SLICE, &block)
|
|
32
|
+
@class ||= Class.new { include HtmlSlice }.new
|
|
33
|
+
@class.html_layout(slice_id, &block)
|
|
34
|
+
end
|
|
35
|
+
|
|
26
36
|
def html_layout(slice_id = DEFAULT_SLICE, &block)
|
|
27
37
|
html_slice(slice_id, wrap: ["<!DOCTYPE html><html>", "</html>"], &block)
|
|
28
38
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: html_slice
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- henrique-ft
|
|
8
|
+
autorequire:
|
|
8
9
|
bindir: exe
|
|
9
10
|
cert_chain: []
|
|
10
|
-
date:
|
|
11
|
+
date: 2026-04-13 00:00:00.000000000 Z
|
|
11
12
|
dependencies: []
|
|
12
13
|
description: Enable Ruby classes the ability to generate reusable pieces of html
|
|
13
14
|
email:
|
|
@@ -18,10 +19,12 @@ extra_rdoc_files: []
|
|
|
18
19
|
files:
|
|
19
20
|
- lib/html_slice.rb
|
|
20
21
|
- lib/html_slice/version.rb
|
|
22
|
+
homepage:
|
|
21
23
|
licenses: []
|
|
22
24
|
metadata:
|
|
23
25
|
source_code_uri: https://github.com/henrique-ft/html_slice
|
|
24
26
|
changelog_uri: https://github.com/henrique-ft/html_slice/blob/master/CHANGELOG.md
|
|
27
|
+
post_install_message:
|
|
25
28
|
rdoc_options: []
|
|
26
29
|
require_paths:
|
|
27
30
|
- lib
|
|
@@ -36,7 +39,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
36
39
|
- !ruby/object:Gem::Version
|
|
37
40
|
version: '0'
|
|
38
41
|
requirements: []
|
|
39
|
-
rubygems_version: 3.
|
|
42
|
+
rubygems_version: 3.3.3
|
|
43
|
+
signing_key:
|
|
40
44
|
specification_version: 4
|
|
41
45
|
summary: Enable Ruby classes the ability to generate reusable pieces of html
|
|
42
46
|
test_files: []
|