Sha256: 5b0e81208cd52a57d3fd6f38a1a71699da82a0a7e1b4d7dd2ce4af0ab5a30a4f

Contents?: true

Size: 1.21 KB

Versions: 15

Compression:

Stored size: 1.21 KB

Contents

module Compass
  module Configuration
    class FileData < Data
      extend Sass::Callbacks

      # on_sprite_generated
      # yields the filename
      # usage: on_sprite_save {|filename| do_somethign(filename) }
      define_callback :sprite_saved

      # on_sprite_generated
      # yields 'ChunkyPNG::Image'
      # usage: on_sprite_generated {|sprite_data| do_something(sprite_data) }
      define_callback :sprite_generated

      # on_stylesheet_saved
      # yields the filename
      # usage: on_stylesheet_saved {|filename| do_something(filename) }
      define_callback :stylesheet_saved

      # on_stylesheet_error
      # yields the filename & message
      # usage: on_stylesheet_error {|filename, message| do_something(filename, message) }
      define_callback :stylesheet_error

      def self.new_from_file(config_file, defaults = nil)
        data = new(config_file)
        data.with_defaults(defaults) do
          data._parse(config_file)
        end
        data
      end

      def self.new_from_string(contents, filename, defaults = nil)
        data = new(filename)
        data.with_defaults(defaults) do
          data.parse_string(contents, filename)
        end
        data
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
radiant-1.0.0 ruby-debug/ruby/1.8/gems/compass-0.11.7/lib/compass/configuration/file_data.rb
compass-0.11.7 lib/compass/configuration/file_data.rb
compass-0.11.6 lib/compass/configuration/file_data.rb
compass-rails31-0.12.0.alpha.0.91a748a lib/compass/configuration/file_data.rb
compass-0.11.5 lib/compass/configuration/file_data.rb
compass-0.11.4 lib/compass/configuration/file_data.rb
compass-0.11.3 lib/compass/configuration/file_data.rb
compass-0.11.2 lib/compass/configuration/file_data.rb
compass-0.11.1 lib/compass/configuration/file_data.rb
compass-0.11.0 lib/compass/configuration/file_data.rb
compass-0.11.beta.7 lib/compass/configuration/file_data.rb
compass-0.11.beta.6 lib/compass/configuration/file_data.rb
compass-0.11.beta.5 lib/compass/configuration/file_data.rb
compass-0.11.beta.4 lib/compass/configuration/file_data.rb
compass-0.11.beta.3 lib/compass/configuration/file_data.rb