Class: ConvenientService::Examples::Standard::Gemfile::Services::FormatHeader

Inherits:
Object
  • Object
show all
Includes:
Service::Configs::Standard
Defined in:
lib/convenient_service/examples/standard/gemfile/services/format_header.rb

Constant Summary collapse

FROZEN_STRING_LITERAL =
"# frozen_string_literal: true"
EMPTY_LINE =
""
ENTER =
"\n"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parsed_content:, skip_frozen_string_literal: false) ⇒ FormatHeader

Returns a new instance of FormatHeader.



37
38
39
40
# File 'lib/convenient_service/examples/standard/gemfile/services/format_header.rb', line 37

def initialize(parsed_content:, skip_frozen_string_literal: false)
  @parsed_content = parsed_content
  @skip_frozen_string_literal = skip_frozen_string_literal
end

Instance Attribute Details

#parsed_contentObject (readonly)

Returns the value of attribute parsed_content.



35
36
37
# File 'lib/convenient_service/examples/standard/gemfile/services/format_header.rb', line 35

def parsed_content
  @parsed_content
end

#skip_frozen_string_literalObject (readonly)

Returns the value of attribute skip_frozen_string_literal.



35
36
37
# File 'lib/convenient_service/examples/standard/gemfile/services/format_header.rb', line 35

def skip_frozen_string_literal
  @skip_frozen_string_literal
end

Instance Method Details

#resultObject



42
43
44
# File 'lib/convenient_service/examples/standard/gemfile/services/format_header.rb', line 42

def result
  success(formatted_content: format_content)
end