class Cranium::CommandLineOptions
Attributes
arguments[R]
Public Class Methods
new(arguments)
click to toggle source
# File lib/cranium/command_line_options.rb, line 5 def initialize(arguments) @arguments = Slop.parse(arguments, autocreate: true).to_hash end
Public Instance Methods
cranium_arguments()
click to toggle source
# File lib/cranium/command_line_options.rb, line 11 def cranium_arguments @cranium_arguments ||= Hash[arguments.map { |k, v| [$1.to_sym, v] if k.to_s =~ /\Acranium\-(.*)/ }.compact] end
load_arguments()
click to toggle source
# File lib/cranium/command_line_options.rb, line 17 def load_arguments @load_arguments ||= Hash[arguments.map { |k, v| [k, v] unless k.to_s =~ /\Acranium\-(.*)/ }.compact] end