Module: Aka::Configuration::Link

Defined in:
lib/aka/configuration.rb

Class Method Summary collapse

Class Method Details

.parse(options) ⇒ Object



34
35
36
37
38
39
40
41
42
43
# File 'lib/aka/configuration.rb', line 34

def self.parse(options)
  unless options['tag'] && options['output']
    abort("Invalid link.")
  end

  OpenStruct.new.tap do |row|
    row.tag = options['tag'] if options['tag']
    row.output = options['output'] if options['output']
  end
end