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

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



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

def initialize(content:)
  @content = content
end

Instance Attribute Details

#contentObject (readonly)

Returns the value of attribute content.



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

def content
  @content
end

Instance Method Details

#resultObject



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

def result
  success(parsed_content: parse_content)
end