Module: PositiveKernelSupport
- Defined in:
- lib/positive_kernel_support.rb,
lib/positive_kernel_support/version.rb
Constant Summary collapse
- VERSION =
::File.open( "#{ ::File.dirname( __FILE__ ) }/../../.current_version" , "r:utf-8" ).read.chomp
コマンドツールへの情報の表示 collapse
-
#put_empty_row(n = 1) ⇒ nil
空行を表示する..
-
#put_message(str) ⇒ nil
str を表示した後,空行を1行追加する..
-
#put_separation_line(n = 128, char: "=") ⇒ nil
区切り線(区切りの記号は = )を表示する.
Instance Method Details
#put_empty_row(n = 1) ⇒ nil
空行を表示する.
12 13 14 15 16 17 18 |
# File 'lib/positive_kernel_support.rb', line 12 def put_empty_row(n=1) raise unless n.natural_number? n.times do puts( "" ) end return nil end |
#put_message(str) ⇒ nil
str を表示した後,空行を1行追加する.
23 24 25 26 27 |
# File 'lib/positive_kernel_support.rb', line 23 def ( str ) puts( str ) put_empty_row return nil end |
#put_separation_line(n = 128, char: "=") ⇒ nil
区切り線(区切りの記号は = )を表示する
33 34 35 36 37 38 |
# File 'lib/positive_kernel_support.rb', line 33 def put_separation_line( n = 128 , char: "=") raise "Error: The variable should be an integer."unless n.natural_number? raise unless char.string? ( char * n ) return nil end |