Class: Slamdown::Conversion::Policy::Decision

Inherits:
Object
  • Object
show all
Defined in:
lib/slamdown/conversion/policy.rb

Overview

One immutable resolved value and the layer that supplied it.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, provenance, element_scope:, attribute_scope: nil) ⇒ Decision

Returns a new instance of Decision.



33
34
35
36
37
38
39
# File 'lib/slamdown/conversion/policy.rb', line 33

def initialize(value, provenance, element_scope:, attribute_scope: nil)
	@value = value
	@provenance = provenance
	@element_scope = element_scope
	@attribute_scope = attribute_scope
	freeze
end

Instance Attribute Details

#attribute_scopeObject (readonly)

Returns the value of attribute attribute_scope.



31
32
33
# File 'lib/slamdown/conversion/policy.rb', line 31

def attribute_scope
  @attribute_scope
end

#element_scopeObject (readonly)

Returns the value of attribute element_scope.



31
32
33
# File 'lib/slamdown/conversion/policy.rb', line 31

def element_scope
  @element_scope
end

#provenanceObject (readonly)

Returns the value of attribute provenance.



31
32
33
# File 'lib/slamdown/conversion/policy.rb', line 31

def provenance
  @provenance
end

#valueObject (readonly)

Returns the value of attribute value.



31
32
33
# File 'lib/slamdown/conversion/policy.rb', line 31

def value
  @value
end