Skip to content

Commit

Permalink
Fix @SInCE versions
Browse files Browse the repository at this point in the history
  • Loading branch information
cllns committed Feb 7, 2025
1 parent 58e5850 commit 33efdef
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/hanami/cli/generators/app/ruby_class_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def fully_qualified_name

private

# @since 2.2.0
# @since 2.2.2
# @api private
attr_reader(
:fs,
Expand All @@ -64,7 +64,7 @@ def fully_qualified_name
:body,
)

# @since 2.2.0
# @since 2.2.2
# @api private
def file_contents
class_definition(
Expand All @@ -73,19 +73,19 @@ def file_contents
)
end

# @since 2.2.0
# @since 2.2.2
# @api private
def class_name
key_parts.last
end

# @since 2.2.0
# @since 2.2.2
# @api private
def local_namespaces
Array(extra_namespace) + key_parts[..-2]
end

# @since 2.2.0
# @since 2.2.2
# @api private
def directory
@directory ||= if local_namespaces.any?
Expand All @@ -95,13 +95,13 @@ def directory
end
end

# @since 2.2.0
# @since 2.2.2
# @api private
def path
fs.join(directory, "#{class_name}.rb")
end

# @since 2.2.0
# @since 2.2.2
# @api private
def class_definition(class_name:, local_namespaces:)
container_module = normalize(namespace)
Expand All @@ -122,7 +122,7 @@ def class_definition(class_name:, local_namespaces:)
)
end

# @since 2.2.0
# @since 2.2.2
# @api private
def normalize(name)
inflector.camelize(name).gsub(/[^\p{Alnum}]/, "")
Expand Down

0 comments on commit 33efdef

Please sign in to comment.