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

Methods included from Service::Configs::Standard

service?, service_class?

Methods included from Config

included

Constructor Details

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

Returns a new instance of FormatHeader.



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

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.



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

def parsed_content
  @parsed_content
end

#skip_frozen_string_literalObject (readonly)

Returns the value of attribute skip_frozen_string_literal.



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

def skip_frozen_string_literal
  @skip_frozen_string_literal
end

Instance Method Details

#resultObject



47
48
49
# File 'lib/convenient_service/examples/standard/gemfile/services/format_header.rb', line 47

def result
  success(formatted_content: format_content)
end