lib/dnote/notes.rb in mvz-dnote-1.9.0 vs lib/dnote/notes.rb in mvz-dnote-1.10.0
- old
+ new
@@ -18,14 +18,14 @@
# TODO: Add ability to read header notes. They often
# have a outline format, rather then the single line.
#++
class Notes
# Default paths (all ruby scripts).
- DEFAULT_PATHS = ["**/*.rb"].freeze
+ DEFAULT_PATHS = ["**/*.rb"].freeze
# Default note labels to look for in source code. (NOT CURRENTLY USED!)
- DEFAULT_LABELS = %w(TODO FIXME OPTIMIZE THINK DEPRECATE).freeze
+ DEFAULT_LABELS = %w[TODO FIXME OPTIMIZE THINK DEPRECATE].freeze
# Files to search for notes.
attr_reader :files
# Labels to document. Defaults are: +TODO+, +FIXME+, +OPTIMIZE+ and +DEPRECATE+.
@@ -43,16 +43,16 @@
# Number of lines of context to show.
attr_reader :context
# New set of notes for give +files+ and optional special labels.
def initialize(files, options = {})
- @files = [files].flatten
- @labels = [options[:labels] || DEFAULT_LABELS].flatten.compact
- @colon = options[:colon].nil? ? true : options[:colon]
- @marker = options[:marker]
- @url = options[:url]
+ @files = [files].flatten
+ @labels = [options[:labels] || DEFAULT_LABELS].flatten.compact
+ @colon = options[:colon].nil? ? true : options[:colon]
+ @marker = options[:marker]
+ @url = options[:url]
@context = options[:context] || 0
- @remark = {}
+ @remark = {}
parse
end
def notes_collection