Class: RGhost::Units::Unit
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value = 0) ⇒ Unit
constructor
A new instance of Unit.
- #ps ⇒ Object
Methods inherited from PsObject
#<<, #call, #graphic_scope, #raw, #set, #to_s
Constructor Details
#initialize(value = 0) ⇒ Unit
Returns a new instance of Unit.
19 20 21 |
# File 'lib/rghost/units.rb', line 19 def initialize(value=0) @value=value end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
17 18 19 |
# File 'lib/rghost/units.rb', line 17 def value @value end |
Class Method Details
.define ⇒ Object
28 29 30 |
# File 'lib/rghost/units.rb', line 28 def Unit.define "" end |
Instance Method Details
#ps ⇒ Object
23 24 25 26 |
# File 'lib/rghost/units.rb', line 23 def ps "#{@value} #{self.class.to_s.gsub('RGhost::Units::','').downcase} " end |