Class: JSHint4r::Result
- Inherits:
-
Object
- Object
- JSHint4r::Result
- Defined in:
- lib/jshint4r/result.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(target, errors) ⇒ Result
constructor
A new instance of Result.
-
#parse(errors) ⇒ Object
- param
-
String errors [return] Object.
Constructor Details
#initialize(target, errors) ⇒ Result
Returns a new instance of Result.
3 4 5 6 |
# File 'lib/jshint4r/result.rb', line 3 def initialize( target, errors ) @target = target @errors = parse( errors ) end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
7 8 9 |
# File 'lib/jshint4r/result.rb', line 7 def errors @errors end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
7 8 9 |
# File 'lib/jshint4r/result.rb', line 7 def target @target end |
Instance Method Details
#parse(errors) ⇒ Object
- param
-
String errors
- return
-
Object
13 14 15 16 17 |
# File 'lib/jshint4r/result.rb', line 13 def parse( errors ) errors = errors || '' raise TypeError unless errors.is_a? String ExecJS.eval( errors ) end |