2006-12-23 22:32:05 +00:00
|
|
|
require 'sass/constant/literal'
|
|
|
|
|
2006-12-23 21:23:27 +00:00
|
|
|
module Sass::Constant
|
|
|
|
class Number
|
2006-12-23 22:32:05 +00:00
|
|
|
include Literal
|
|
|
|
|
2006-12-23 21:23:27 +00:00
|
|
|
def initialize(value)
|
|
|
|
value = value.to_f
|
|
|
|
value = value.to_i if value % 1 == 0.0
|
|
|
|
@value = value
|
|
|
|
end
|
|
|
|
|
|
|
|
def to_s
|
|
|
|
@value.to_s
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|