Skip to content

Commit c2af4de

Browse files
committed
Standard fixes
1 parent 67dfcd3 commit c2af4de

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

lib/generators/strapi/component_generator.rb

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,37 +46,36 @@ def run_other_generators
4646
def print_method_defintions
4747
puts <<~HEREDOC
4848
49-
#{"*" * 80}
49+
#{"*" * 80}
5050
51-
Remember to add the mapping method to #{STRAPI_PATH}factories/#{@component_type_filename}_factory.rb
51+
Remember to add the mapping method to #{STRAPI_PATH}factories/#{@component_type_filename}_factory.rb
5252
53-
!! Code provided below, but may require modification depending on data types !!
53+
!! Code provided below, but may require modification depending on data types !!
5454
55-
#{factory_key}
56-
#{"-" * 80}
55+
#{factory_key}
56+
#{"-" * 80}
5757
58-
#{method_defintion}
59-
#{"*" * 80}
58+
#{method_defintion}
59+
#{"*" * 80}
6060
6161
HEREDOC
6262
end
6363

6464
def factory_key
6565
<<~RUBY
66-
when "#{@component_strapi_name}":
67-
to_#{@component_filename}(strapi_data)
66+
when "#{@component_strapi_name}":
67+
to_#{@component_filename}(strapi_data)
6868
RUBY
6969
end
7070

7171
def method_defintion
7272
<<~RUBY
7373
def to_#{@component_filename}(strapi_data)
7474
DynamicsComponents::Blocks::#{@component_name_class}.new(
75-
#{@strapi_params.map{"#{_1.underscore}: strapi_data[:#{_1}]"}.join(",\n\s\s\s\s")}
75+
#{@strapi_params.map { "#{_1.underscore}: strapi_data[:#{_1}]" }.join(",\n\s\s\s\s")}
7676
)
7777
end
7878
RUBY
7979
end
80-
8180
end
8281
end

0 commit comments

Comments
 (0)