Class: RGhost::Units::Unit

Inherits:
PsObject show all
Defined in:
lib/rghost/units.rb

Direct Known Subclasses

Cm, Inch, PSUnit

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#valueObject

Returns the value of attribute value.



17
18
19
# File 'lib/rghost/units.rb', line 17

def value
  @value
end

Class Method Details

.defineObject



28
29
30
# File 'lib/rghost/units.rb', line 28

def Unit.define
  ""
end

Instance Method Details

#psObject



23
24
25
26
# File 'lib/rghost/units.rb', line 23

def ps
  	
  "#{@value} #{self.class.to_s.gsub('RGhost::Units::','').downcase} "
end