Class: Choosy::Printing::FormattingElement

Inherits:
Object
  • Object
show all
Defined in:
lib/choosy/printing/formatting_element.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind, value, styles) ⇒ FormattingElement

Returns a new instance of FormattingElement.



5
6
7
8
9
# File 'lib/choosy/printing/formatting_element.rb', line 5

def initialize(kind, value, styles)
  @value = value
  @kind = kind
  @styles = styles
end

Instance Attribute Details

#kindObject (readonly)

Returns the value of attribute kind.



3
4
5
# File 'lib/choosy/printing/formatting_element.rb', line 3

def kind
  @kind
end

#stylesObject (readonly)

Returns the value of attribute styles.



3
4
5
# File 'lib/choosy/printing/formatting_element.rb', line 3

def styles
  @styles
end

#valueObject (readonly)

Returns the value of attribute value.



3
4
5
# File 'lib/choosy/printing/formatting_element.rb', line 3

def value
  @value
end

Instance Method Details

#header?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/choosy/printing/formatting_element.rb', line 11

def header?
  @kind == :header
end