Sha256: c8b61fd9ade6643ed5fe2dc19c5f8eed97f3e47d03a596a771ab512e611f63fe

Contents?: true

Size: 1.47 KB

Versions: 6

Compression:

Stored size: 1.47 KB

Contents

# -*- encoding : utf-8 -*-
class Card; module Set; class Abstract
# Set: Abstract (BootstrapCodeFile)
#
module BootstrapCodeFile;
extend Card::Set
def self.source_location; "/Users/ethan/dev/decko/gem/card-mod-bootstrap/set/abstract/bootstrap_code_file.rb"; end

def self.included host_class
  host_class.include_set Abstract::CodeFile
  host_class.include OverrideCodeFile
end

module OverrideCodeFile
  def content
    stylesheets.join "\n"
  end

  def stylesheets
    load_stylesheets unless @stylesheets
    @stylesheets
  end

  def add_bs_subdir sub_dir
    Dir.glob("#{bootstrap_path}/#{sub_dir}/*.scss").each do |path|
      load_from_path path
    end
  end

  def mod_path
    mod_root :bootstrap
  end

  def bootstrap_path
    "#{mod_path}/vendor/bootstrap/scss"
  end

  def add_stylesheet filename, type: :scss
    load_from_path "#{mod_path}/lib/stylesheets/#{filename}.#{type}"
  end

  def add_stylesheet_file path
    load_from_path File.join(mod_path, path)
  end

  def add_bs_stylesheet filename, type: :scss, subdir: nil
    path = File.join(*[bootstrap_path, subdir, "_#{filename}.#{type}"].compact)
    load_from_path path
  end

  def load_from_path path
    @stylesheets ||= []
    Rails.logger.debug "reading file: #{path}"
    @stylesheets << File.read(path)
  end

  def source_changed _since:
    false
  end

  def existing_source_paths
    []
  end
end
end;end;end;end;
# ~~ generated from /Users/ethan/dev/decko/gem/card-mod-bootstrap/set/abstract/bootstrap_code_file.rb ~~

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
card-1.101.5 tmpsets/set/mod021-card-mod-bootstrap/abstract/bootstrap_code_file.rb
card-1.101.4 tmpsets/set/mod021-card-mod-bootstrap/abstract/bootstrap_code_file.rb
card-1.101.3 tmpsets/set/mod021-card-mod-bootstrap/abstract/bootstrap_code_file.rb
card-1.101.2 tmpsets/set/mod021-card-mod-bootstrap/abstract/bootstrap_code_file.rb
card-1.101.1 tmpsets/set/mod021-card-mod-bootstrap/abstract/bootstrap_code_file.rb
card-1.101.0 tmpsets/set/mod021-card-mod-bootstrap/abstract/bootstrap_code_file.rb