Class: FIR::Util::Publisher

Inherits:
Object show all
Includes:
FIR::Util
Defined in:
lib/fir/util/publisher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ActiveSupport::Concern

#append_features, #class_methods, extended, #included

Constructor Details

#initialize(args, options) ⇒ Publisher

Returns a new instance of Publisher.



10
11
12
13
14
15
16
17
18
19
# File 'lib/fir/util/publisher.rb', line 10

def initialize(args, options)
  @file_path     = File.absolute_path(args.first.to_s)
  @file_type     = File.extname(@file_path).delete('.')
  @token         = options[:token] || current_token
  @changelog     = read_changelog(options[:changelog]).to_s.to_utf8
  @short         = options[:short].to_s
  @passwd        = options[:password].to_s
  @is_opened     = @passwd.blank? ? options[:open] : false
  @export_qrcode = !!options[:qrcode]
end

Instance Attribute Details

#argsObject

Returns the value of attribute args.



8
9
10
# File 'lib/fir/util/publisher.rb', line 8

def args
  @args
end

#optionsObject

Returns the value of attribute options.



8
9
10
# File 'lib/fir/util/publisher.rb', line 8

def options
  @options
end