Class: Reflex::StyleLength

Inherits:
Object
  • Object
show all
Defined in:
lib/reflex/style_length.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ StyleLength

Returns a new instance of StyleLength.



12
13
14
15
16
17
18
19
20
21
# File 'lib/reflex/style_length.rb', line 12

def initialize (*args)
  return if args.empty?
  case args[0]
  when Numeric
    args << :px if args.size < 2
    setup_num *args
  when String
    setup_str *args
  end
end

Instance Method Details

#inspectObject



23
24
25
# File 'lib/reflex/style_length.rb', line 23

def inspect ()
  "#<#{self.class.name} #{to_s}>"
end