class Riserva::Commands::ApplicationCommand
Public Class Methods
new()
click to toggle source
# File lib/riserva/commands/application_command.rb, line 9 def initialize subscribe(build_listener.new) end
Public Instance Methods
call(path)
click to toggle source
# File lib/riserva/commands/application_command.rb, line 17 def call(path) @path = Pathname.new(path) valid? end
files()
click to toggle source
# File lib/riserva/commands/application_command.rb, line 13 def files listeners.first.files end
Private Instance Methods
build_listener()
click to toggle source
# File lib/riserva/commands/application_command.rb, line 28 def build_listener class_name = self.class.name.split('::').last listener = "Riserva::Listeners::#{class_name}".safe_constantize raise NotImplementedError if listener.nil? listener end
valid?()
click to toggle source
# File lib/riserva/commands/application_command.rb, line 24 def valid? @path.exist? end