Class: Kitchen::Selectors::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/selectors/base.rb

Overview

Base class for different selector configurations

Direct Known Subclasses

Standard1

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#chapterString

Selector for a chapter

Returns:



25
26
27
# File 'lib/kitchen/selectors/base.rb', line 25

def chapter
  @chapter
end

#composite_chapterString

Selector for a composite chapter

Returns:



49
50
51
# File 'lib/kitchen/selectors/base.rb', line 49

def composite_chapter
  @composite_chapter
end

#composite_pageString

Selector for a composite page

Returns:



46
47
48
# File 'lib/kitchen/selectors/base.rb', line 46

def composite_page
  @composite_page
end

#exampleString

Selector for an example

Returns:



52
53
54
# File 'lib/kitchen/selectors/base.rb', line 52

def example
  @example
end

#exerciseString

Selector for an exercise

Returns:



55
56
57
# File 'lib/kitchen/selectors/base.rb', line 55

def exercise
  @exercise
end

#figureString

Selector for a figure

Returns:



40
41
42
# File 'lib/kitchen/selectors/base.rb', line 40

def figure
  @figure
end

#injected_exerciseString

Selector for an injected exercise

Returns:



70
71
72
# File 'lib/kitchen/selectors/base.rb', line 70

def injected_exercise
  @injected_exercise
end

#injected_questionString

Selector for an injected question

Returns:



64
65
66
# File 'lib/kitchen/selectors/base.rb', line 64

def injected_question
  @injected_question
end

#metadataString

Selector for a metadata

Returns:



43
44
45
# File 'lib/kitchen/selectors/base.rb', line 43

def 
  @metadata
end

#noteString

Selector for a note

Returns:



31
32
33
# File 'lib/kitchen/selectors/base.rb', line 31

def note
  @note
end

#pageString

Selector for a page

Returns:



28
29
30
# File 'lib/kitchen/selectors/base.rb', line 28

def page
  @page
end

#page_summaryString

Selector for the summary in a page

Returns:



19
20
21
# File 'lib/kitchen/selectors/base.rb', line 19

def page_summary
  @page_summary
end

#referenceString

Selector for a reference

Returns:



22
23
24
# File 'lib/kitchen/selectors/base.rb', line 22

def reference
  @reference
end

#sectionString

Selector for a section

Returns:



67
68
69
# File 'lib/kitchen/selectors/base.rb', line 67

def section
  @section
end

#solutionString

Selector for an unit

Returns:



61
62
63
# File 'lib/kitchen/selectors/base.rb', line 61

def solution
  @solution
end

#tableString

Selector for a table

Returns:



37
38
39
# File 'lib/kitchen/selectors/base.rb', line 37

def table
  @table
end

#termString

Selector for a term

Returns:



34
35
36
# File 'lib/kitchen/selectors/base.rb', line 34

def term
  @term
end

#title_in_introduction_pageString

Selector for the title in an introduction page

Returns:



16
17
18
# File 'lib/kitchen/selectors/base.rb', line 16

def title_in_introduction_page
  @title_in_introduction_page
end

#title_in_pageString

Selector for the title in a page

Returns:



13
14
15
# File 'lib/kitchen/selectors/base.rb', line 13

def title_in_page
  @title_in_page
end

#unitString

Selector for an unit

Returns:



58
59
60
# File 'lib/kitchen/selectors/base.rb', line 58

def unit
  @unit
end

Instance Method Details

#override(hash = {}) ⇒ Base

Override specific selectors

Parameters:

  • hash (Hash) (defaults to: {})

    a hash of selectors to selector values, e.g. ‘.title’

Returns:

  • (Base)

    this object



77
78
79
80
81
82
# File 'lib/kitchen/selectors/base.rb', line 77

def override(hash={})
  hash.each do |selector, value|
    send("#{selector}=", value)
  end
  self
end