Class: Polites::Markup

Inherits:
Object
  • Object
show all
Defined in:
lib/polites/markup.rb

Overview

The markup section defines the markup used in a Polites document, specifying both its versions and patterns defined in Tags.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(version, identifier, display_name, tags = []) ⇒ Markup

Returns a new instance of Markup.

Parameters:

  • version (String)
  • identifier (String)
  • display_name (String)
  • tags (Array<Tag>) (defaults to: [])


23
24
25
26
27
28
29
# File 'lib/polites/markup.rb', line 23

def initialize(version, identifier, display_name, tags = [])
  @version = version
  @identifier = identifier
  @display_name = display_name
  @tags = tags
  freeze
end

Instance Attribute Details

#display_nameString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/polites/markup.rb', line 14

def display_name
  @display_name
end

#identifierString (readonly)

Returns:

  • (String)


11
12
13
# File 'lib/polites/markup.rb', line 11

def identifier
  @identifier
end

#tagsArray<Tag> (readonly)

Returns:



17
18
19
# File 'lib/polites/markup.rb', line 17

def tags
  @tags
end

#versionString (readonly)

Returns:

  • (String)


8
9
10
# File 'lib/polites/markup.rb', line 8

def version
  @version
end