Skip to content

Commit 73e92aa

Browse files
Merge pull request #374 from puppetlabs/maint_fix_rubocop_warnings
(maint) Fix rubocop lint warnings
2 parents a32bb82 + e3a9bfd commit 73e92aa

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

lib/puppet-strings/describe.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def self.list_one(object)
6666
targetlength = 48
6767
shortento = targetlength - 4
6868
contentstring = object[:docstring][:text]
69-
end_of_line = contentstring.index("\n") # "." gives closer results to old describeb, but breaks for '.k5login'
69+
end_of_line = contentstring.index("\n") # "." gives closer results to old describeb, but breaks for '.k5login'
7070
contentstring = contentstring[0..end_of_line] unless end_of_line.nil?
7171
contentstring = "#{contentstring[0..shortento]} ..." if contentstring.length > targetlength
7272

lib/puppet-strings/yard/code_objects/function.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class PuppetStrings::Yard::CodeObjects::Functions < PuppetStrings::Yard::CodeObj
88
# @param [Symbol] type The function type to get the group for.
99
# @return Returns the singleton instance of the group.
1010
def self.instance(type)
11-
super("puppet_functions_#{type}".to_sym)
11+
super(:"puppet_functions_#{type}")
1212
end
1313

1414
# Gets the display name of the group.

lib/puppet-strings/yard/code_objects/provider.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class PuppetStrings::Yard::CodeObjects::Providers < PuppetStrings::Yard::CodeObj
88
# @param [String] type The resource type name for the provider.
99
# @return Returns the singleton instance of the group.
1010
def self.instance(type)
11-
super("puppet_providers_#{type}".to_sym)
11+
super(:"puppet_providers_#{type}")
1212
end
1313

1414
# Gets the display name of the group.

lib/puppet-strings/yard/code_objects/type.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def parameters
169169
# render-time. For now, this should re-resolve on every call.
170170
# may be able to memoize this
171171
def providers
172-
providers = YARD::Registry.all("puppet_providers_#{name}".to_sym)
172+
providers = YARD::Registry.all(:"puppet_providers_#{name}")
173173
return providers if providers.empty?
174174

175175
providers.first.children

lib/puppet-strings/yard/util.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def self.github_to_yard_links(data)
3535
# @return [Array] Returns an array of tag hashes.
3636
def self.tags_to_hashes(tags)
3737
# Skip over the API tags that are public
38-
tags.select { |t| (t.tag_name != 'api' || t.text != 'public') }.map do |t|
38+
tags.select { |t| t.tag_name != 'api' || t.text != 'public' }.map do |t|
3939
next t.to_hash if t.respond_to?(:to_hash)
4040

4141
tag = { tag_name: t.tag_name }

0 commit comments

Comments
 (0)