Sha256: 8236dae2461e30e17743d347b22a399bbe467d45a7f4178a9e06c3cf2b5750d2

Contents?: true

Size: 442 Bytes

Versions: 1

Compression:

Stored size: 442 Bytes

Contents

module Highcharts
  class Base < ActionView::Base
    
    def initialize(*args)
      args.extract_options!.each {|arg, value| self.send("#{arg}=", value)}
    end
    
    def render_options(args)
      attrs = []
      args.each do |t, a|
        a.split.each do |option|
          attrs << "#{option}: #{t == :objects ? send(option) : "'#{send(option)}'"}" if send(option).present?
        end
      end
      attrs
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
highcharts-js-rails-0.0.1 lib/highcharts/base.rb