Class: Coppertone::Modifier::Unknown

Inherits:
Coppertone::Modifier show all
Defined in:
lib/coppertone/modifier/unknown.rb

Overview

Object representing unknown modifiers - those that aren’t explicitly defined by the SPF spec

Constant Summary

Constants inherited from Coppertone::Modifier

MODIFIER_REGEXP

Instance Attribute Summary collapse

Attributes inherited from Coppertone::Modifier

#arguments

Instance Method Summary collapse

Methods inherited from Coppertone::Modifier

build, build_unknown, class_builder, matching_term, register, #to_s

Constructor Details

#initialize(label, attributes) ⇒ Unknown

Returns a new instance of Unknown.



7
8
9
10
11
12
13
# File 'lib/coppertone/modifier/unknown.rb', line 7

def initialize(label, attributes)
  super(attributes)
  @label = label
  @macro_string = Coppertone::MacroString.new(attributes)
rescue Coppertone::MacroStringParsingError
  raise Coppertone::InvalidModifierError
end

Instance Attribute Details

#labelObject (readonly)

Returns the value of attribute label.



6
7
8
# File 'lib/coppertone/modifier/unknown.rb', line 6

def label
  @label
end

Instance Method Details

#context_dependent?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/coppertone/modifier/unknown.rb', line 15

def context_dependent?
  false
end

#includes_ptr?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/coppertone/modifier/unknown.rb', line 19

def includes_ptr?
  false
end