Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Commit

Permalink
Modify to explicitly specify printer's text files
Browse files Browse the repository at this point in the history
This way, they can be easier specified in other gems, since they may not
rely on finding files in only some specific directory
  • Loading branch information
astashov committed Mar 4, 2013
1 parent 5f1ba3e commit da1657b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/ruby-debug/printers/base.rb
Expand Up @@ -38,7 +38,7 @@ def parts(path)

def contents
@contents ||= contents_files.inject({}) do |hash, filename|
hash[filename] = YAML.load_file(File.expand_path(File.join("..", "texts", "#{filename}.yml"), __FILE__)) || {}
hash[filename] = YAML.load_file(filename) || {}
hash
end
end
Expand All @@ -52,7 +52,7 @@ def array_of_args(collection, &block)
end

def contents_files
["base"]
[File.expand_path(File.join("..", "texts", "base.yml"), __FILE__)]
end
end
end
2 changes: 1 addition & 1 deletion lib/ruby-debug/printers/plain.rb
Expand Up @@ -34,7 +34,7 @@ def get_modifier(path)
end

def contents_files
["plain"] + super
[File.expand_path(File.join("..", "texts", "plain.yml"), __FILE__)] + super
end

end
Expand Down

0 comments on commit da1657b

Please sign in to comment.