OSDN Git Service

element
[pettanr/pettanr.git] / lib / common.rb
index 7d0eb2e..04c5856 100644 (file)
@@ -16,5 +16,10 @@ class Hash
   def to_attr
     self.map {|k, n| "#{k}=\"#{n}\"" }.join(' ')
   end
+  
+  def to_style
+    self.map {|k, n| "#{k}: #{n}" }.join('; ')
+  end
+  
 end