Module: FancyCommand

Defined in:
lib/fancy_command.rb,
lib/fancy_command/command.rb,
lib/fancy_command/version.rb

Defined Under Namespace

Classes: Command

Constant Summary collapse

VERSION =
"0.0.4"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.defaultsObject



9
10
11
# File 'lib/fancy_command.rb', line 9

def self.defaults
  @defaults ||= {}.freeze
end

.defaults=(new_defaults) ⇒ Object



13
14
15
# File 'lib/fancy_command.rb', line 13

def self.defaults=(new_defaults)
  @defaults = new_defaults.freeze
end

.new(string, **opts, &blk) ⇒ Object



5
6
7
# File 'lib/fancy_command.rb', line 5

def self.new(string, **opts, &blk)
  Command.new(string, **opts, &blk)
end

Instance Method Details

#command(string, **opts, &blk) ⇒ Object



21
22
23
# File 'lib/fancy_command.rb', line 21

def command(string, **opts, &blk)
  Command.new(string, **opts, &blk)
end

#run(string, **opts, &blk) ⇒ Object



17
18
19
# File 'lib/fancy_command.rb', line 17

def run(string, **opts, &blk)
  command(string, **opts, &blk).()
end