Permalink
Browse files

Merge pull request #43 from dkubb/fix/yardstick-document-regression

Fix yardstick document regression
  • Loading branch information...
dkubb committed Dec 21, 2015
2 parents 17c8c60 + af00c67 commit 6dcc0139eca3b6bfbdfd6722c77937142e6ed1b9
View
@@ -1,3 +1,3 @@
---
threshold: 10
-total_score: 217
+total_score: 213
View
@@ -44,14 +44,25 @@ def self.measure(document, config)
)
end
+ # Initialize document with docstring
+ #
+ # @param docstring [YARD::Docstring]
+ #
+ # @return [undefined]
+ #
+ # @api private
+ def initialize(docstring)
+ @docstring = docstring
+ end
+
# @!attribute [r] docstring
#
# Return document yard docstring
#
# @return [YARD::Docstring]
#
# @api private
- include Concord::Public.new(:docstring)
+ attr_reader :docstring
# The raw text for the summary
#
View
@@ -35,6 +35,13 @@ def self.inherited(subclass)
end
private_class_method :inherited
+ # Macro for describing current rule
+ #
+ # @param text [String]
+ #
+ # @return [RuleDescription]
+ #
+ # @api private
def self.describe(text)
self.description = RuleDescription.parse(text)
end
@@ -4,7 +4,7 @@
describe Yardstick, '.measure_string' do
context 'with a string' do
- subject { described_class.measure_string('def test; end') }
+ subject { described_class.measure_string("def foo;end\ndef bar;end") }
it { should be_a(Yardstick::MeasurementSet) }

0 comments on commit 6dcc013

Please sign in to comment.