Class: Compass::Configuration::Inheritance::ClassMethods::ArrayProxy

### Home Classes Methods

### In Files

- lib/compass/configuration/inheritance.rb

### Parent

Object

### Methods

- ::new
- #<<
- #>>
- #method_missing
- #serialize_to_config
- #to_a
- #to_ary

### Class/Module Index

Quicksearch

- Compass
- Compass::BrowserSupport
- Compass::Configuration
- Compass::Configuration::Adapters
- Compass::Configuration::Data
- Compass::Configuration::Defaults
- Compass::Configuration::Inheritance
- Compass::Configuration::Inheritance::ClassMethods
- Compass::Configuration::Inheritance::ClassMethods::ArrayProxy
- Compass::Configuration::Inheritance::InstanceMethods
- Compass::Configuration::Paths
- Compass::Configuration::Watch
- Compass::Core
- Compass::Core::CanIUse
- Compass::Core::SassExtensions
- Compass::Core::SassExtensions::Functions
- Compass::Core::SassExtensions::Functions::Colors
- Compass::Core::SassExtensions::Functions::Configuration
- Compass::Core::SassExtensions::Functions::Constants
- Compass::Core::SassExtensions::Functions::CrossBrowserSupport
- Compass::Core::SassExtensions::Functions::CrossBrowserSupport::CSS2FallbackValue
- Compass::Core::SassExtensions::Functions::Display
- Compass::Core::SassExtensions::Functions::Enumerate
- Compass::Core::SassExtensions::Functions::Env
- Compass::Core::SassExtensions::Functions::Files
- Compass::Core::SassExtensions::Functions::FontFiles
- Compass::Core::SassExtensions::Functions::GradientSupport
- Compass::Core::SassExtensions::Functions::GradientSupport::Assertions
- Compass::Core::SassExtensions::Functions::GradientSupport::CSS3AngleToSVGConverter
- Compass::Core::SassExtensions::Functions::GradientSupport::ColorStop
- Compass::Core::SassExtensions::Functions::GradientSupport::Functions
- Compass::Core::SassExtensions::Functions::GradientSupport::Gradient
- Compass::Core::SassExtensions::Functions::GradientSupport::Gradient::ClassMethods
- Compass::Core::SassExtensions::Functions::GradientSupport::LinearGradient
- Compass::Core::SassExtensions::Functions::GradientSupport::RadialGradient
- Compass::Core::SassExtensions::Functions::ImageSize
- Compass::Core::SassExtensions::Functions::ImageSize::ImageProperties
- Compass::Core::SassExtensions::Functions::ImageSize::JPEG
- Compass::Core::SassExtensions::Functions::InlineImage
- Compass::Core::SassExtensions::Functions::Lists
- Compass::Core::SassExtensions::Functions::Math
- Compass::Core::SassExtensions::Functions::SassDeclarationHelper
- Compass::Core::SassExtensions::Functions::Selectors
- Compass::Core::SassExtensions::Functions::Urls
- Compass::Core::SassExtensions::Functions::Urls::FontUrl
- Compass::Core::SassExtensions::Functions::Urls::GeneratedImageUrl
- Compass::Core::SassExtensions::Functions::Urls::ImageUrl
- Compass::Core::SassExtensions::Functions::Urls::StylesheetUrl
- Compass::Error
- Compass::Frameworks
- Compass::Frameworks::Framework
- Compass::HasDeprecatedConstantsFromCore
- Compass::SassExtensions
- Compass::SassExtensions::Functions
- Compass::Util
- Sass
- Sass::Script
- Sass::Script::CrossBrowserFunctionCall
- Sass::Script::Funcall
- Sass::Script::Functions
- Sass::Script::Functions::EvaluationContext
- Sass::Script::HasSimpleCrossBrowserFunctionSupport
- Sass::Script::List
- Sass::Script::Value
- Sass::Script::Value::ArgList
- Sass::Script::Value::Base
- Sass::Script::Value::List
- Sass::Script::Value::Map
- Sass::Tree
- Sass::Tree::Node

No matching classes.

# Compass::Configuration::Inheritance::ClassMethods::ArrayProxy

### Public Class Methods

new(data, attr) click to toggle source

    # File lib/compass/configuration/inheritance.rb, line 65
    def initialize(data, attr)
      @data, @attr = data, attr
    end

### Public Instance Methods

<<(v) click to toggle source

    # File lib/compass/configuration/inheritance.rb, line 74
    def <<(v)
      @data.send(:"add_to_#{@attr}", v)
    end

>>(v) click to toggle source

    # File lib/compass/configuration/inheritance.rb, line 77
    def >>(v)
      @data.send(:"remove_from_#{@attr}", v)
    end

method_missing(m, *args, &block) click to toggle source

    # File lib/compass/configuration/inheritance.rb, line 102
    def method_missing(m, *args, &block)
      a = to_ary
      if a.respond_to?(m)
        a.send(m,*args, &block)
      else
        super
      end
    end

serialize_to_config(prop) click to toggle source

    # File lib/compass/configuration/inheritance.rb, line 80
    def serialize_to_config(prop)
      if v = @data.raw(prop)
        "#{prop} = #{v.inspect}"
      else
        s = ""
        if added = @data.instance_variable_get("@added_to_#{@attr}")
          added.each do |a|
            s << "#{prop} << #{a.inspect}\n"
          end
        end
        if removed = @data.instance_variable_get("@removed_from_#{@attr}")
          removed.each do |r|
            s << "#{prop} >> #{r.inspect}\n"
          end
        end
        if s[-1..-1] == "\n"
          s[0..-2]
        else
          s
        end
      end
    end

to_a() click to toggle source

    # File lib/compass/configuration/inheritance.rb, line 71
    def to_a
      to_ary
    end

to_ary() click to toggle source

    # File lib/compass/configuration/inheritance.rb, line 68
    def to_ary
      @data.send(:"read_inherited_#{@attr}_array")
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.