Class: Rbss::Selector

Inherits:
Struct
  • Object
show all
Defined in:
lib/rbss/selector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#classes_idsObject

Returns the value of attribute classes_ids

Returns:

  • (Object)

    the current value of classes_ids



2
3
4
# File 'lib/rbss/selector.rb', line 2

def classes_ids
  @classes_ids
end

#divObject

Returns the value of attribute div

Returns:

  • (Object)

    the current value of div



2
3
4
# File 'lib/rbss/selector.rb', line 2

def div
  @div
end

Instance Method Details

#add_to_properties(property) ⇒ Object



15
16
17
18
# File 'lib/rbss/selector.rb', line 15

def add_to_properties(property)
  properties
  @properties << property
end

#identify_parent(name) ⇒ Object



7
8
9
# File 'lib/rbss/selector.rb', line 7

def identify_parent(name)
  @parent = name
end

#nameObject



3
4
5
# File 'lib/rbss/selector.rb', line 3

def name
  "#{"#{parent} " unless parent.nil?}#{div unless div == '_'}#{classes_ids.join}"
end

#parentObject



11
12
13
# File 'lib/rbss/selector.rb', line 11

def parent
  @parent
end

#propertiesObject



20
21
22
# File 'lib/rbss/selector.rb', line 20

def properties
  @properties ||= []
end