triplet 0.1.0 → 0.1.1

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: 0c2ae911efdf5e51950b9ea7cb3e0f87ab0120372ae95228efdd2e3ffa71e95a
4
- data.tar.gz: 0b5cdb5f35ab5b190f28717ece455929a6925e255e7037a36fe0e70a198f2e01
3
+ metadata.gz: a9a70da4253bc13f56358d94ad6fd728a5ff505d08eaa189cf7340f2738f6f56
4
+ data.tar.gz: 401e54a2a4232d02169a120e52a020ee8c040127ac3c6d5abccc35bba3bfe583
5
5
  SHA512:
6
- metadata.gz: 0e94b7bc419fad2252c66f3ce993d604d45bf50e48c24e674d27b917b0e29a9c17c36261a604df31f69ac330814829f7e49ec15fad827d4275a792882a1d8b01
7
- data.tar.gz: 42ea02614e766814218ca5c25c56098d817c1e605b6bc9bf851ebe2e4d15ed0805040c687d055f11f972ce69eb861ed2d7bb8b3a647349eaed4d69a34f30301a
6
+ metadata.gz: 191d40c421c97a606a7aaa8266a5fbe031b9be87b27b3768717222e692080fdb2f57c13fd14b716cba9d6bc80566a3f46c5f2a27989ab18c817379f88523db19
7
+ data.tar.gz: c8968e91d41f1613bda73c0eb8edfdf3471e3a5b41fa78ab31204265ddc55ce6e541d710592ec5d263a712d1949a8961c38aec3225dcbe105a3be2df73587491
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- triplet (0.1.0)
4
+ triplet (0.1.1)
5
5
  actionview (>= 5.0.0, < 7.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -68,13 +68,13 @@ b { "world" }
68
68
  ### View Component Support
69
69
 
70
70
  To use in view components, include the `Triplet::ViewComponent` module and
71
- define a `template` method. The module will handle the rest.
71
+ define a `call` method. The module will handle the rest.
72
72
 
73
73
  ```ruby
74
74
  class NavComponent < ::ViewComponent::Base
75
75
  include Triplet::ViewComponent
76
76
 
77
- def template
77
+ def call
78
78
  h1 { "hello world" }
79
79
 
80
80
  render NavItemComponent.new(title: "Home", path: "/")
@@ -1,3 +1,3 @@
1
1
  module Triplet
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -6,15 +6,9 @@ module Triplet
6
6
  module ViewComponent
7
7
  include Triplet::DSL
8
8
 
9
- def self.included(klass)
10
- klass.define_method(:call) do
11
- @output_buffer ||= ActionView::OutputBuffer.new
12
- template
13
- end
14
- end
15
-
16
- def template
17
- raise "#template method not implemented"
9
+ def render_in(view_context, &block)
10
+ @output_buffer ||= ActionView::OutputBuffer.new
11
+ super(view_context, &block)
18
12
  end
19
13
  end
20
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: triplet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Blake Williams