class Hatemile::Util::Css::Rcp::RCPDeclaration
The RCPDeclaration
class is official implementation of Hatemile::Util::Css::StyleSheetDeclaration
for Ruby CSS Parser.
Public Class Methods
new(property_name, value)
click to toggle source
Initializes a new object that encapsulate the Ruby CSS Parser declaration.
@param property_name [String] The property name of declaration. @param value [String] The value of declaration.
# File lib/hatemile/util/css/rcp/rcp_declaration.rb, line 47 def initialize(property_name, value) Hatemile::Helper.require_not_nil(property_name, value) Hatemile::Helper.require_valid_type(property_name, String) Hatemile::Helper.require_valid_type(value, String) @property_name = property_name @value = value end
Public Instance Methods
get_property()
click to toggle source
@see Hatemile::Util::Css::StyleSheetDeclaration#get_property
# File lib/hatemile/util/css/rcp/rcp_declaration.rb, line 70 def get_property @property_name end
get_value()
click to toggle source
@see Hatemile::Util::Css::StyleSheetDeclaration#get_value
# File lib/hatemile/util/css/rcp/rcp_declaration.rb, line 58 def get_value @value end
get_values()
click to toggle source
@see Hatemile::Util::Css::StyleSheetDeclaration#get_values
# File lib/hatemile/util/css/rcp/rcp_declaration.rb, line 64 def get_values get_value.split(/[ \n\t\r]+/) end