ruht 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 778e8a28e69f33686442343e199b4aa9fbe3f295008a9d3bcc16c743c03d9358
4
- data.tar.gz: 7fbb6762ef0e55c160b17542b4d872895c35f673488d3dd398ef69adf090a185
3
+ metadata.gz: ece4fd78ad56b8ff0f6b00a8c0a22363144cd20997b55b8543f975cf8796f602
4
+ data.tar.gz: 13a3910f3870b83a720f8d337f374f7b6d1b4533246d13fe437586e1020a9a93
5
5
  SHA512:
6
- metadata.gz: 12283a4a5a1a3ef88c7037bd143cd8842b46bdce0ca53ebadb5e55d1b7bf7a86879ff289c33e6469ee095651f7e6d16fd78cb8058818858b6db30fffe4bdc011
7
- data.tar.gz: 3b9143c7d17fe9ff91fb5f3e4e7e02fdb366c03687d190ee436a7aa132f04059da092975919b5a6b94a6e97c58c18ff7da6653160e3cd2a37b35bacf3e237e91
6
+ metadata.gz: bf681db394cc68422b782e87ae56b994446f2190d3e32e617717733fc59e2f1a4991cad0931a87d118cc354eeca4175de6f2c3164037debc9263cbaa0049bcc2
7
+ data.tar.gz: 8a46c0f1c586c92a89e99d11fcb458575d5a33d270b5048b72fbcd71d5e10133e59805500d11a0d0c6e22482ddde7a47ad81cee3bdea6796fd2ba0b1f9cb1dac
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruht (0.0.1)
4
+ ruht (0.0.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/ruht/fragment.rb CHANGED
@@ -48,5 +48,17 @@ module Ruht
48
48
  object.is_a?(simple_class)
49
49
  end
50
50
  end
51
+
52
+ def method_missing(method_name, *args, &block)
53
+ return super unless respond_to_missing?(method_name, *args, &block)
54
+
55
+ @child_block.binding.receiver.send(method_name, *args, &block)
56
+ end
57
+
58
+ def respond_to_missing?(method_name, *args)
59
+ return false unless @child_block
60
+
61
+ @child_block.binding.receiver.respond_to?(method_name)
62
+ end
51
63
  end
52
64
  end
data/lib/ruht/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ruht
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
@@ -15,5 +15,8 @@ module Ruht
15
15
 
16
16
  def eval_children!: -> void
17
17
  def can_render?: (untyped object) -> bool
18
+
19
+ def method_missing: (Symbol method_name, *untyped args) -> untyped
20
+ def respond_to_missing?: (Symbol method_name, *untyped args) -> bool
18
21
  end
19
22
  end
data/sig/ruht/tags.rbs CHANGED
@@ -1,5 +1,8 @@
1
1
  module Ruht
2
2
  module Tags
3
+ TAG_NAMES: Array[Symbol]
4
+ VOID_TAG_NAMES: Array[Symbol]
5
+
3
6
  def render!: (untyped _element) -> void
4
7
  def self.included: (Module receiver) -> void
5
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruht
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Barskov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-05 00:00:00.000000000 Z
11
+ date: 2023-02-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Ruht lets you generate HTML using Ruby syntax
14
14
  email: