Class: GithubPagesRakeTasks::Interface
- Inherits:
-
Object
- Object
- GithubPagesRakeTasks::Interface
- Extended by:
- Forwardable
- Defined in:
- lib/github_pages_rake_tasks/interface.rb
Overview
Whenever the publish task has to interact with things outside of itself, it uses an instance of the interface class. This makes the tests easy to mock.
Inject an object into an instance of PublishTask in order to mock the task's interaction with the outside world.
Instance Method Summary collapse
-
#initialize
constructor
Creates a new interface object.
Constructor Details
#initialize
Creates a new interface object
This object will delegate methods to the objects passed in as defined in the Forwardable def_delegators above.
57 58 59 60 61 |
# File 'lib/github_pages_rake_tasks/interface.rb', line 57 def initialize @file_utils = Rake::FileUtilsExt @dir = Dir @file = File end |