Expose `@filename` from the `Plugin` class

This commit is contained in:
Alex Ling 2020-07-22 13:51:45 +00:00
parent 10b6047df8
commit dcfd1c8765
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ class Plugin
getter {{name.id}} = ""
{% end %}
getter wait_seconds : UInt64 = 0
getter filename
def self.list
dir = Config.current.plugin_path
@ -34,7 +35,7 @@ class Plugin
end
end
def initialize(filename : String)
def initialize(@filename : String)
dir = Config.current.plugin_path
Dir.mkdir_p dir unless Dir.exists? dir