Class: Belafonte::App

Inherits:
Object
  • Object
show all
Includes:
DSL, Helpers, Rhythm
Defined in:
lib/belafonte/app.rb

Overview

An application container

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Rhythm

#execute!

Methods included from Helpers::Subcommands

#subcommands

Methods included from Helpers::Arguments

#arg, #args

Methods included from Helpers::Flags

#option, #options, #switch_active?, #switches

Methods included from Helpers::Sharing

#partake, #share

Methods included from Helpers::MetaData

#configured_args, #configured_options, #configured_subcommands, #configured_switches, #description, #summary, #title

Methods included from DSL

included

Constructor Details

#initialize(argv, stdin = STDIN, stdout = STDOUT, stderr = STDERR, kernel = Kernel, parent = nil) ⇒ App

Returns a new instance of App.



14
15
16
17
18
19
20
21
# File 'lib/belafonte/app.rb', line 14

def initialize(argv, stdin = STDIN, stdout = STDOUT, stderr = STDERR, kernel = Kernel, parent = nil)
  @argv = argv
  @stdin = stdin
  @stdout = stdout
  @stderr = stderr
  @kernel = kernel
  @parent = parent
end

Instance Attribute Details

#argvObject (readonly)

Returns the value of attribute argv.



12
13
14
# File 'lib/belafonte/app.rb', line 12

def argv
  @argv
end

#kernelObject (readonly)

Returns the value of attribute kernel.



12
13
14
# File 'lib/belafonte/app.rb', line 12

def kernel
  @kernel
end

#stderrObject (readonly)

Returns the value of attribute stderr.



12
13
14
# File 'lib/belafonte/app.rb', line 12

def stderr
  @stderr
end

#stdinObject (readonly)

Returns the value of attribute stdin.



12
13
14
# File 'lib/belafonte/app.rb', line 12

def stdin
  @stdin
end

#stdoutObject (readonly)

Returns the value of attribute stdout.



12
13
14
# File 'lib/belafonte/app.rb', line 12

def stdout
  @stdout
end