Class: ConvenientService::Examples::Standard::Gemfile::Services::StripComments
- Inherits:
-
Object
- Object
- ConvenientService::Examples::Standard::Gemfile::Services::StripComments
- Includes:
- Service::Configs::Standard
- Defined in:
- lib/convenient_service/examples/standard/gemfile/services/strip_comments.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
(also: #content_with_comments)
readonly
Returns the value of attribute content.
Instance Method Summary collapse
-
#initialize(content:) ⇒ StripComments
constructor
A new instance of StripComments.
- #result ⇒ Object
Constructor Details
#initialize(content:) ⇒ StripComments
Returns a new instance of StripComments.
24 25 26 |
# File 'lib/convenient_service/examples/standard/gemfile/services/strip_comments.rb', line 24 def initialize(content:) @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly) Also known as: content_with_comments
Returns the value of attribute content.
16 17 18 |
# File 'lib/convenient_service/examples/standard/gemfile/services/strip_comments.rb', line 16 def content @content end |
Instance Method Details
#result ⇒ Object
28 29 30 |
# File 'lib/convenient_service/examples/standard/gemfile/services/strip_comments.rb', line 28 def result success(content_without_comments: file_without_comments.read) end |