Class: Pio::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/pio/options.rb

Overview

User options utility.

Class Method Summary collapse

Class Method Details

.mandatory_option(name) ⇒ Object



6
7
8
9
10
11
# File 'lib/pio/options.rb', line 6

def self.mandatory_option(name)
  unless const_defined?(:MANDATORY_OPTIONS)
    const_set(:MANDATORY_OPTIONS, [])
  end
  const_get(:MANDATORY_OPTIONS) << name
end

.option(name) ⇒ Object



13
14
15
16
# File 'lib/pio/options.rb', line 13

def self.option(name)
  const_set(:OPTIONS, []) unless const_defined?(:OPTIONS)
  const_get(:OPTIONS) << name
end