class Xezat::Command::Announce

Public Class Methods

new(options, cygport) click to toggle source
# File lib/xezat/command/announce.rb, line 10
def initialize(options, cygport)
  @options = options
  @cygport = cygport
end

Public Instance Methods

execute() click to toggle source
# File lib/xezat/command/announce.rb, line 15
def execute
  variables = variables(@cygport)
  erb = File.expand_path(File.join(TEMPLATE_DIR, 'announce.erb'))
  print ERB.new(File.readlines(erb).join(nil), trim_mode: '%-').result(binding).chop # remove redundant new line
end