Class: Compass::Core::SassExtensions::Functions::CrossBrowserSupport::CSS2FallbackValue

Inherits:
Sass::Script::Value::Base show all
Defined in:
lib/compass/core/sass_extensions/functions/cross_browser_support.rb

Constant Summary

Constants inherited from Sass::Script::Value::Base

Sass::Script::Value::Base::NO_CHILDREN

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Sass::Script::Value::Base

#opts

Constructor Details

#initialize(value, css2_value) ⇒ CSS2FallbackValue

Returns a new instance of CSS2FallbackValue.



9
10
11
12
# File 'lib/compass/core/sass_extensions/functions/cross_browser_support.rb', line 9

def initialize(value, css2_value)
  self.value = value
  self.css2_value = css2_value
end

Instance Attribute Details

#css2_valueObject

Returns the value of attribute css2_value.



5
6
7
# File 'lib/compass/core/sass_extensions/functions/cross_browser_support.rb', line 5

def css2_value
  @css2_value
end

#valueObject

Returns the value of attribute value.



5
6
7
# File 'lib/compass/core/sass_extensions/functions/cross_browser_support.rb', line 5

def value
  @value
end

Instance Method Details

#childrenObject



6
7
8
# File 'lib/compass/core/sass_extensions/functions/cross_browser_support.rb', line 6

def children
  [value, css2_value]
end

#has_aspect?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/compass/core/sass_extensions/functions/cross_browser_support.rb', line 22

def has_aspect?
  true
end

#inspectObject



13
14
15
# File 'lib/compass/core/sass_extensions/functions/cross_browser_support.rb', line 13

def inspect
  to_s
end

#supports?(aspect) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/compass/core/sass_extensions/functions/cross_browser_support.rb', line 19

def supports?(aspect)
  aspect == "css2"
end

#to_css2(options = self.options) ⇒ Object



25
26
27
# File 'lib/compass/core/sass_extensions/functions/cross_browser_support.rb', line 25

def to_css2(options = self.options)
  css2_value
end

#to_s(options = self.options) ⇒ Object



16
17
18
# File 'lib/compass/core/sass_extensions/functions/cross_browser_support.rb', line 16

def to_s(options = self.options)
  value.to_s(options)
end