Class: HCl::Console

Inherits:
Object
  • Object
show all
Defined in:
lib/hcl/console.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Console

Returns a new instance of Console.



7
8
9
10
11
12
13
14
# File 'lib/hcl/console.rb', line 7

def initialize app
  @hcl = app
  prompt = $PROGRAM_NAME.split('/').last + "> "
  columns = HighLine::SystemExtensions.terminal_size[0] rescue 80
  binding.pry quiet: true,
    prompt:[->(a,b,c){ prompt }],
    print:->(io, *p){ PP.pp p, io, columns }
end

Instance Attribute Details

#hclObject (readonly)

Returns the value of attribute hcl.



6
7
8
# File 'lib/hcl/console.rb', line 6

def hcl
  @hcl
end