Class: Devtools::Site
- Inherits:
-
Object
- Object
- Devtools::Site
- Defined in:
- lib/devtools/site.rb,
lib/devtools/site/initializer.rb
Overview
Encapsulates a specific Project devtools is used for
Defined Under Namespace
Classes: Initializer
Instance Attribute Summary collapse
-
#project ⇒ Object
readonly
Returns the value of attribute project.
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
-
#init ⇒ undefined
private
Initialize devtools using default config.
-
#init_spec_helper ⇒ self
private
Initialize project and load shared specs.
-
#initialize(project) ⇒ Site
constructor
A new instance of Site.
Constructor Details
#initialize(project) ⇒ Site
Returns a new instance of Site.
12 13 14 15 |
# File 'lib/devtools/site.rb', line 12 def initialize(project) @project = project @root = project.root end |
Instance Attribute Details
#project ⇒ Object (readonly)
Returns the value of attribute project.
10 11 12 |
# File 'lib/devtools/site.rb', line 10 def project @project end |
#root ⇒ Object (readonly)
Returns the value of attribute root.
8 9 10 |
# File 'lib/devtools/site.rb', line 8 def root @root end |
Instance Method Details
#init ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize devtools using default config
34 35 36 37 38 |
# File 'lib/devtools/site.rb', line 34 def init Initializer.call(self) puts 'Run bundle install to complete the devtools installation' self end |
#init_spec_helper ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize project and load shared specs
Expects to be called from $application_root/spec/spec_helper.rb
24 25 26 27 |
# File 'lib/devtools/site.rb', line 24 def init_spec_helper Project::Initializer::Rspec.call(project) self end |