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

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

Constant Summary collapse

RUBY_REGEX =
/\A\s*ruby/
SOURCE_REGEX =
/\A\s*source/
GIT_SOURCE_REGEX =
/\A\s*git_source/
GROUP_REGEX =
/\A\s*group/
GEM_REGEX =
/\A\s*gem/
BLOCK_END_REGEX =
/\A\s*end/
ENV_SCAN_REGEX =
/:(\w+)/

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content:) ⇒ ParseContent

Returns a new instance of ParseContent.



50
51
52
# File 'lib/convenient_service/examples/standard/v1/gemfile/services/parse_content.rb', line 50

def initialize(content:)
  @content = content
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



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

def content
  @content
end

Instance Method Details

#resultObject



54
55
56
# File 'lib/convenient_service/examples/standard/v1/gemfile/services/parse_content.rb', line 54

def result
  success(data: {parsed_content: parse_content})
end