Class: Toolman::ToolObject
- Inherits:
-
Object
- Object
- Toolman::ToolObject
- Defined in:
- lib/toolman.rb
Instance Method Summary collapse
-
#initialize ⇒ ToolObject
constructor
A new instance of ToolObject.
- #loading_bar(nowPoint, endPoint) ⇒ Object
- #puts ⇒ Object
- #say(data) ⇒ Object
Constructor Details
#initialize ⇒ ToolObject
Returns a new instance of ToolObject.
33 34 35 36 37 38 |
# File 'lib/toolman.rb', line 33 def initialize @tempPoint = 0 @circle = [">",">>",">>>",">>>>"," >>>"," >>"," >"," "] @circleSize = @circle.size @colorMechine = Color.new end |
Instance Method Details
#loading_bar(nowPoint, endPoint) ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/toolman.rb', line 48 def (nowPoint,endPoint) p = (( (nowPoint*1.0) / endPoint) * 100).floor print "\r" print " \r" print "%5d%-3s%-5s%-3s" % [p,"%","#{@circle[@tempPoint]}",""] @tempPoint = (@tempPoint + 1) % @circleSize end |
#puts ⇒ Object
56 57 58 |
# File 'lib/toolman.rb', line 56 def puts @colorMechine end |
#say(data) ⇒ Object
42 43 44 45 46 |
# File 'lib/toolman.rb', line 42 def say(data) puts "\n>>>>>>>>>>>>>>>>>Messange>>>>>>>>>>>>>>>>>" puts "#{data}" puts ">>>>>>>>>>>>>>>>>Messange>>>>>>>>>>>>>>>>>\n" end |