mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Rules: Added file accessor
This commit is contained in:
parent
b1148a2b41
commit
d5b12e8e27
2 changed files with 7 additions and 0 deletions
|
@ -56,6 +56,12 @@ void Rules::load (const std::string& file, int nest /* = 1 */)
|
|||
parse (contents, nest);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string Rules::file () const
|
||||
{
|
||||
return _original_file;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Rules::has (const std::string& key) const
|
||||
{
|
||||
|
|
|
@ -36,6 +36,7 @@ class Rules
|
|||
public:
|
||||
Rules () = default;
|
||||
void load (const std::string&, int next = 1);
|
||||
std::string file () const;
|
||||
|
||||
bool has (const std::string&) const;
|
||||
std::string get (const std::string&) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue