Skip to content

Commit

Permalink
Rubocop autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
mikezaby committed Feb 2, 2024
1 parent cecfaca commit 916f5aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/my_data/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def inspect
format_attrs = attributes.map do |name|
mapping = mappings[name]
type = mapping[:type] == :resource ? mapping[:resource].name : mapping[:type]
type = mapping[:collection] ? "[#{type}]" : type
type = "[#{type}]" if mapping[:collection]

"#{name}: #{type}"
end
Expand Down Expand Up @@ -142,7 +142,7 @@ def attributes
end

def attributes=(attrs)
attrs = attrs.respond_to?(:attributes) ? attrs.attributes : attrs
attrs = attrs.attributes if attrs.respond_to?(:attributes)

attrs.each do |key, value|
next unless attribute_names.include?(key.to_s)
Expand Down
2 changes: 1 addition & 1 deletion lib/my_data/xsd/resource_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def generate_docs
end

def generate_types
MyData::Xsd::Structure.complex_types.each do |_, type|
MyData::Xsd::Structure.complex_types.each_value do |type|
generate_file(name: type.name, namespace: type.namespace, xsd_mode: "xsd_complex_type")
end

Expand Down

0 comments on commit 916f5aa

Please sign in to comment.