Class: ScrewServer::JshintSuite
- Inherits:
-
Object
- Object
- ScrewServer::JshintSuite
- Defined in:
- lib/screw_server/jshint_suite.rb
Constant Summary collapse
- DEFAULT_OPTIONS =
All options see www.jshint.com/docs/
{ "bitwise" => true, "browser" => true, "jquery" => true, "eqeqeq" => true, "immed" => true, "newcap" => true, "undef" => true, }
Instance Attribute Summary collapse
-
#file_list ⇒ Object
Returns the value of attribute file_list.
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(n) ⇒ JshintSuite
constructor
A new instance of JshintSuite.
- #options_with_defaults ⇒ Object
Constructor Details
#initialize(n) ⇒ JshintSuite
Returns a new instance of JshintSuite.
17 18 19 |
# File 'lib/screw_server/jshint_suite.rb', line 17 def initialize(n) @name = n end |
Instance Attribute Details
#file_list ⇒ Object
Returns the value of attribute file_list.
15 16 17 |
# File 'lib/screw_server/jshint_suite.rb', line 15 def file_list @file_list end |
#name ⇒ Object
Returns the value of attribute name.
15 16 17 |
# File 'lib/screw_server/jshint_suite.rb', line 15 def name @name end |
#options ⇒ Object
Returns the value of attribute options.
15 16 17 |
# File 'lib/screw_server/jshint_suite.rb', line 15 def end |
Class Method Details
.suites_from(file) ⇒ Object
25 26 27 28 29 |
# File 'lib/screw_server/jshint_suite.rb', line 25 def self.suites_from(file) @suites = [] eval(IO.read(file), binding, file) @suites end |
Instance Method Details
#options_with_defaults ⇒ Object
31 32 33 |
# File 'lib/screw_server/jshint_suite.rb', line 31 def DEFAULT_OPTIONS.merge(self. || {}) end |