Class: Slamdown::Conversion::Policy::MatchDecision

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

Overview

One immutable allow/deny result for combined class or ID matchers.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allowed, provenance) ⇒ MatchDecision

Returns a new instance of MatchDecision.



46
47
48
49
50
# File 'lib/slamdown/conversion/policy.rb', line 46

def initialize(allowed, provenance)
	@allowed = allowed
	@provenance = provenance.freeze
	freeze
end

Instance Attribute Details

#allowedObject (readonly)

Returns the value of attribute allowed.



44
45
46
# File 'lib/slamdown/conversion/policy.rb', line 44

def allowed
  @allowed
end

#provenanceObject (readonly)

Returns the value of attribute provenance.



44
45
46
# File 'lib/slamdown/conversion/policy.rb', line 44

def provenance
  @provenance
end

Instance Method Details

#allowed?Boolean

Returns:

  • (Boolean)


52
53
54
# File 'lib/slamdown/conversion/policy.rb', line 52

def allowed?
	allowed
end