Sha256: b8420dcea143c9509a91e9697cf0da396aea846068f02fcc91dcf1fb164bf6fc

Contents?: true

Size: 629 Bytes

Versions: 10

Compression:

Stored size: 629 Bytes

Contents

module Guilded
  class ComponentDef
    
    attr_reader :kind, :options, :libs, :styles
    attr_accessor :additional_js
  
    def initialize( kind, options={}, libs=[], styles=[], additional_js='' )
      @kind = kind
      @options = options
      @libs = libs
      @styles = styles
      @additional_js = additional_js
    end
    
    def exclude_css?
      options.include?( :exclude_css ) && ( options[:exclude_css] == 'true' || options[:exclude_css] == true )
    end
    
    def exclude_js?
      options.include?( :exclude_js ) && ( options[:exclude_js] == 'true' || options[:exclude_js] == true )
    end

  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
midas-guilded-0.2.5 lib/guilded/component_def.rb
midas-guilded-0.2.6 lib/guilded/component_def.rb
midas-guilded-0.2.7 lib/guilded/component_def.rb
midas-guilded-0.2.8 lib/guilded/component_def.rb
midas-guilded-0.2.9 lib/guilded/component_def.rb
midas-guilded-0.3.0 lib/guilded/component_def.rb
guilded-1.0.3 lib/guilded/component_def.rb
guilded-1.0.2 lib/guilded/component_def.rb
guilded-1.0.1 lib/guilded/component_def.rb
guilded-1.0.0 lib/guilded/component_def.rb