Class: Habaki::Angle
Overview
<angle> value type in deg, rad
Instance Attribute Summary collapse
Attributes inherited from Value
Instance Method Summary collapse
-
#initialize(data = nil, unit = nil) ⇒ Angle
constructor
A new instance of Angle.
- #read_from_katana(val) ⇒ void private
- #string(format = Formatter::Base.new) ⇒ String
Methods inherited from Value
Methods inherited from Node
Constructor Details
#initialize(data = nil, unit = nil) ⇒ Angle
Returns a new instance of Angle.
198 199 200 201 |
# File 'lib/habaki/value.rb', line 198 def initialize(data = nil, unit = nil) @data = data @unit = unit end |
Instance Attribute Details
#unit ⇒ Symbol
196 197 198 |
# File 'lib/habaki/value.rb', line 196 def unit @unit end |
Instance Method Details
#read_from_katana(val) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
211 212 213 214 215 |
# File 'lib/habaki/value.rb', line 211 def read_from_katana(val) @data = val.value @unit = val.unit @unit = nil if @unit == :dimension end |