Class: ConvenientService::Examples::Standard::Gemfile::Services::ReadFileContent
- Inherits:
-
Object
- Object
- ConvenientService::Examples::Standard::Gemfile::Services::ReadFileContent
- Includes:
- Service::Configs::Standard
- Defined in:
- lib/convenient_service/examples/standard/gemfile/services/read_file_content.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path:) ⇒ ReadFileContent
constructor
A new instance of ReadFileContent.
- #result ⇒ Object
Constructor Details
#initialize(path:) ⇒ ReadFileContent
Returns a new instance of ReadFileContent.
18 19 20 |
# File 'lib/convenient_service/examples/standard/gemfile/services/read_file_content.rb', line 18 def initialize(path:) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
11 12 13 |
# File 'lib/convenient_service/examples/standard/gemfile/services/read_file_content.rb', line 11 def path @path end |
Instance Method Details
#result ⇒ Object
22 23 24 |
# File 'lib/convenient_service/examples/standard/gemfile/services/read_file_content.rb', line 22 def result success(content: ::File.read(path)) end |