module Option

File: parser.rb Project: dotfiles-cli Author: exstnce (exstnce@protonmail.ch) Created on Monday, 9th July 2018 3:32:36 pm

Public Class Methods

on(arg) { |strip| ... } click to toggle source
# File lib/dotfiles/parse/parser.rb, line 27
def self.on(arg)
  if arg == ARGV[0].downcase
    if ARGV.length >= 2 && !ARGV[1].strip.empty?
      yield ARGV[1].strip
    else
      yield
    end
  end
end
on_empty() { || ... } click to toggle source
# File lib/dotfiles/parse/parser.rb, line 21
def self.on_empty
  if ARGV.empty?
    yield
  end
end