Skip to content

Commit d71f26a

Browse files
jacksonpiresclaude
andcommitted
[Bug Fix] Remove redundant keyword_init: true in docs app Structs
Same Style/RedundantStructKeywordInit drift failing the Docs (Rails) linter. Drop the redundant `keyword_init: true` from the six sample Structs in the docs app; keyword instantiation still works on Ruby 3.2+. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ba8d218 commit d71f26a

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

docs/app/components/themes/grid/repo_tabs.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Components
44
module Themes
55
module Grid
66
class RepoTabs < Components::Base
7-
Repo = Struct.new(:github_url, :name, :stars, :version, keyword_init: true)
7+
Repo = Struct.new(:github_url, :name, :stars, :version)
88

99
def view_template
1010
Tabs(default_value: "overview", class: "w-full") do

docs/app/components/themes/grid/table.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Components
44
module Themes
55
module Grid
66
class Table < Components::Base
7-
User = Struct.new(:avatar_url, :name, :username, :commits, :github_url, keyword_init: true)
7+
User = Struct.new(:avatar_url, :name, :username, :commits, :github_url)
88

99
# def view_template
1010
# render RubyUI::Card.new(class: "p-6") do

docs/app/views/docs/data_table.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
class Views::Docs::DataTable < Views::Base
4-
Row = Struct.new(:id, :name, :email, :salary, :status, keyword_init: true)
4+
Row = Struct.new(:id, :name, :email, :salary, :status)
55

66
def view_template
77
@rows = [

docs/app/views/docs/table.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# frozen_string_literal: true
22

33
class Views::Docs::Table < Views::Base
4-
Invoice = Struct.new(:identifier, :status, :method, :amount, keyword_init: true)
5-
User = Struct.new(:avatar_url, :name, :username, :commits, :github_url, keyword_init: true)
4+
Invoice = Struct.new(:identifier, :status, :method, :amount)
5+
User = Struct.new(:avatar_url, :name, :username, :commits, :github_url)
66

77
def view_template
88
component = "Table"

docs/app/views/docs/tabs.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
class Views::Docs::Tabs < Views::Base
4-
Repo = Struct.new(:github_url, :name, :stars, :version, keyword_init: true)
4+
Repo = Struct.new(:github_url, :name, :stars, :version)
55

66
def view_template
77
component = "Tabs"

0 commit comments

Comments
 (0)