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

Inherits:
Object
  • Object
show all
Includes:
Service::Configs::Standard::V1
Defined in:
lib/convenient_service/examples/standard/v1/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.



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

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.



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

def parsed_content
  @parsed_content
end

#skip_frozen_string_literalObject (readonly)

Returns the value of attribute skip_frozen_string_literal.



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

def skip_frozen_string_literal
  @skip_frozen_string_literal
end

Instance Method Details

#resultObject



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

def result
  success(formatted_content: format_content)
end