Class Sass::Selector::AbstractSequence
In: lib/sass/selector/abstract_sequence.rb
Parent: Object
Haml::Util Engine Color SyntaxError UnitConversionError StandardError AbstractSequence CommaSequence Sequence SimpleSequence Simple Parent Universal Class SelectorPseudoClass Id Pseudo Attribute Interpolation Element Node Operation Literal UnaryOperation StringInterpolation Funcall Interpolation Variable Lexer CssLexer Number Bool String Parser Parser CssParser EvaluationContext SassParser StaticParser CssParser Node DebugNode IfNode CommentNode ForNode PropNode MixinNode DirectiveNode VariableNode RootNode ExtendNode WarnNode WhileNode RuleNode MixinDefNode Enumerable ImportNode Merb::BootLoader MerbBootLoader Repl CSS Environment Rack StalenessChecker lib/sass/repl.rb lib/sass/css.rb lib/sass/environment.rb lib/sass/error.rb lib/sass/engine.rb lib/sass/selector/simple_sequence.rb lib/sass/selector/abstract_sequence.rb lib/sass/selector/sequence.rb lib/sass/selector/comma_sequence.rb lib/sass/selector/simple.rb lib/sass/selector.rb Selector lib/sass/script/css_parser.rb lib/sass/script/lexer.rb lib/sass/script/color.rb lib/sass/script/string.rb lib/sass/script/unary_operation.rb lib/sass/script/variable.rb lib/sass/script/funcall.rb lib/sass/script/string_interpolation.rb lib/sass/script/operation.rb lib/sass/script/bool.rb lib/sass/script/parser.rb lib/sass/script/node.rb lib/sass/script/literal.rb lib/sass/script/interpolation.rb lib/sass/script/css_lexer.rb lib/sass/script/number.rb lib/sass/script/functions.rb Functions Script lib/sass/scss/sass_parser.rb lib/sass/scss/static_parser.rb lib/sass/scss/parser.rb lib/sass/scss/css_parser.rb ScriptLexer ScriptParser RX SCSS Files Callbacks lib/sass/tree/while_node.rb lib/sass/tree/if_node.rb lib/sass/tree/mixin_def_node.rb lib/sass/tree/debug_node.rb lib/sass/tree/root_node.rb lib/sass/tree/for_node.rb lib/sass/tree/import_node.rb lib/sass/tree/prop_node.rb lib/sass/tree/node.rb lib/sass/tree/comment_node.rb lib/sass/tree/extend_node.rb lib/sass/tree/mixin_node.rb lib/sass/tree/warn_node.rb lib/sass/tree/directive_node.rb lib/sass/tree/rule_node.rb lib/sass/tree/variable_node.rb Tree lib/sass/plugin/rack.rb lib/sass/plugin/staleness_checker.rb lib/sass/plugin/merb.rb Plugin Sass dot/m_63_0.png

The abstract parent class of the various selector sequence classes.

All subclasses should implement a `members` method that returns an array of object that respond to `line=` and `filename=`.

Methods

==   eql?   filename=   hash   line=  

Attributes

filename  [R]  The name of the file in which this selector was declared.

@return [String, nil]

line  [R]  The line of the Sass template on which this selector was declared.

@return [Fixnum]

Public Instance methods

==(other)

Alias for eql?

Checks equality between this and another object.

Subclasses should define `_eql?` rather than overriding this method, which handles checking class equality and hash equality.

@param other [Object] The object to test equality against @return [Boolean] Whether or not this is equal to `other`

[Source]

    # File lib/sass/selector/abstract_sequence.rb, line 56
56:       def eql?(other)
57:         other.class == self.class && other.hash == self.hash && _eql?(other)
58:       end

Sets the name of the file in which this selector was declared, or `nil` if it was not declared in a file (e.g. on stdin). This also sets the filename for all child selectors.

@param filename [String, nil] @return [String, nil]

[Source]

    # File lib/sass/selector/abstract_sequence.rb, line 34
34:       def filename=(filename)
35:         members.each {|m| m.filename = filename}
36:         @filename = filename
37:       end

Returns a hash code for this sequence.

Subclasses should define `_hash` rather than overriding this method, which automatically handles memoizing the result.

@return [Fixnum]

[Source]

    # File lib/sass/selector/abstract_sequence.rb, line 45
45:       def hash
46:         @_hash ||= _hash
47:       end

Sets the line of the Sass template on which this selector was declared. This also sets the line for all child selectors.

@param line [Fixnum] @return [Fixnum]

[Source]

    # File lib/sass/selector/abstract_sequence.rb, line 23
23:       def line=(line)
24:         members.each {|m| m.line = line}
25:         @line = line
26:       end

[Validate]