Class: WritersRoom::ProjectTool
- Inherits:
-
RobotLab::Tool
- Object
- RobotLab::Tool
- WritersRoom::ProjectTool
- Defined in:
- lib/writers_room/tools/project_tool.rb
Overview
Base class for tools that operate on files within a project directory. Enforces that all file access stays within the project root.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#project_path ⇒ Object
readonly
Returns the value of attribute project_path.
Instance Method Summary collapse
-
#initialize(project_path:, robot: nil) ⇒ ProjectTool
constructor
A new instance of ProjectTool.
Constructor Details
#initialize(project_path:, robot: nil) ⇒ ProjectTool
Returns a new instance of ProjectTool.
11 12 13 14 |
# File 'lib/writers_room/tools/project_tool.rb', line 11 def initialize(project_path:, robot: nil) super(robot: robot) @project_path = File.(project_path) end |
Instance Attribute Details
#project_path ⇒ Object (readonly)
Returns the value of attribute project_path.
9 10 11 |
# File 'lib/writers_room/tools/project_tool.rb', line 9 def project_path @project_path end |