lib/dnote/session.rb in mvz-dnote-1.9.0 vs lib/dnote/session.rb in mvz-dnote-1.10.0
- old
+ new
@@ -78,19 +78,19 @@
yield(self) if block_given?
end
# Set default values for attributes.
def initialize_defaults
- @paths = []
- @labels = []
+ @paths = []
+ @labels = []
@exclude = []
- @ignore = []
- @format = DEFAULT_FORMAT
- @title = DEFAULT_TITLE
- @dryrun = false
- @marker = nil
- @url = nil
+ @ignore = []
+ @format = DEFAULT_FORMAT
+ @title = DEFAULT_TITLE
+ @dryrun = false
+ @marker = nil
+ @url = nil
@context = 0
end
public
@@ -146,10 +146,10 @@
end.flatten.uniq
end
# List availble format templates
def list_templates
- tdir = File.join(DIR, "templates")
+ tdir = File.join(DIR, "templates")
tfiles = Dir[File.join(tdir, "**/*.erb")]
tnames = tfiles.map { |tname| tname.sub("#{tdir}/", "").chomp(".erb") }
groups = tnames.group_by { |tname| tname.split("/").first }
groups.sort.each do |(_type, names)|
puts("%-18s " * names.size % names.sort)