slotify 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: 7901ad71acf99111a450667e96a494becbfc55d78c62ab2314b7c3b8dae7e588
4
- data.tar.gz: 73ef165ade4d766b69ef68cbba336bf488991e452038f751d3e5fb2f82c34bf5
3
+ metadata.gz: 1ab98a9cc284edb88505a7e87f06b10f57d33e9e531387b3bf2eb184c2f543f5
4
+ data.tar.gz: 96635ec015c16ebca358ad031b8f8bf5e4c3c253102f94d8730cb894a252d3f5
5
5
  SHA512:
6
- metadata.gz: 906ce11515dcb698273445333d273233e96b9006454714b8d17d8a034f38fd333ef649c4d196e21d403e93ed1bca3c4016849aa4c1ac22c3803870d851dce1ba
7
- data.tar.gz: d45ebbafe579ff34b4727ab14edae97898a87fd87452b841b3989f438248d927cdb16593b4ab05321bf4dce8a7f1e99f39639065798a91a7436f72f442d2b227
6
+ metadata.gz: df1dee1e6d19c450efdbfe4cffac050b7d4f13dd76d25ebbfcbfb2ddc187373e4c597fd1902c8e006077167a6f2919eee7e00d064dee75556d20ee0929886d1c
7
+ data.tar.gz: e05a1dc621cb9bdc7b8e0c269bfd472cb7790edc2d94a8c8f9aee7f714b0a3ff52cfa714cc2c041afdc2cfa33245b0faf036172c3b742399bc19e8df339164f6
data/README.md CHANGED
@@ -178,9 +178,9 @@ the default value will be used instead.
178
178
  <%# slots: (title: "Default title", author: nil) -%>
179
179
  ```
180
180
 
181
- ### Setting slot values
181
+ ### Passing content to slots
182
182
 
183
- Content is passed into slots using dynamically generated `partial#with_<slot_name>` writer methods.
183
+ Content is passed to slots by calling the appropriate `.with_<slot_name>` writer method on the argument yielded to the block when rendering the partial.
184
184
 
185
185
  Content can be provided as either the **first argument** or **as a block** when calling these methods at render time.
186
186
  The following two examples are equivalent:
data/lib/slotify/error.rb CHANGED
@@ -1,4 +1,7 @@
1
1
  module Slotify
2
+ class Error < StandardError
3
+ end
4
+
2
5
  class UnknownSlotError < NameError
3
6
  end
4
7
 
@@ -1,3 +1,3 @@
1
1
  module Slotify
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/slotify.rb CHANGED
@@ -6,6 +6,7 @@ require_relative "slotify/error"
6
6
  loader = Zeitwerk::Loader.for_gem
7
7
  loader.tag = "slotify"
8
8
  loader.push_dir("#{__dir__}/slotify", namespace: Slotify)
9
+ loader.ignore("#{__dir__}/slotify/error")
9
10
  loader.collapse("#{__dir__}/slotify/concerns")
10
11
  loader.collapse("#{__dir__}/slotify/services")
11
12
  loader.enable_reloading if ENV["RAILS_ENV"] == "development"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slotify
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
  - Mark Perkins
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  requirements: []
82
- rubygems_version: 3.5.10
82
+ rubygems_version: 3.3.3
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: Superpowered slots for your Rails partials.