Class: Reddy::RdfaParser::EvaluationContext
- Inherits:
-
Object
- Object
- Reddy::RdfaParser::EvaluationContext
- Defined in:
- lib/reddy/rdfaparser.rb
Overview
The Recursive Baggage
Instance Attribute Summary collapse
-
#base ⇒ Object
:nodoc:.
-
#incomplete_triples ⇒ Object
Returns the value of attribute incomplete_triples.
-
#language ⇒ Object
Returns the value of attribute language.
-
#parent_object ⇒ Object
Returns the value of attribute parent_object.
-
#parent_subject ⇒ Object
Returns the value of attribute parent_subject.
-
#uri_mappings ⇒ Object
Returns the value of attribute uri_mappings.
Instance Method Summary collapse
-
#initialize(base) ⇒ EvaluationContext
constructor
A new instance of EvaluationContext.
-
#initialize_copy(from) ⇒ Object
Copy this Evaluation Context.
- #inspect ⇒ Object
Constructor Details
#initialize(base) ⇒ EvaluationContext
Returns a new instance of EvaluationContext.
23 24 25 26 27 28 29 30 31 |
# File 'lib/reddy/rdfaparser.rb', line 23 def initialize(base) # Initialize the evaluation context, [5.1] @base = base @parent_subject = @base @parent_object = nil @uri_mappings = {} @incomplete_triples = [] @language = nil end |
Instance Attribute Details
#base ⇒ Object
:nodoc:
16 17 18 |
# File 'lib/reddy/rdfaparser.rb', line 16 def base @base end |
#incomplete_triples ⇒ Object
Returns the value of attribute incomplete_triples.
20 21 22 |
# File 'lib/reddy/rdfaparser.rb', line 20 def incomplete_triples @incomplete_triples end |
#language ⇒ Object
Returns the value of attribute language.
21 22 23 |
# File 'lib/reddy/rdfaparser.rb', line 21 def language @language end |
#parent_object ⇒ Object
Returns the value of attribute parent_object.
18 19 20 |
# File 'lib/reddy/rdfaparser.rb', line 18 def parent_object @parent_object end |
#parent_subject ⇒ Object
Returns the value of attribute parent_subject.
17 18 19 |
# File 'lib/reddy/rdfaparser.rb', line 17 def parent_subject @parent_subject end |
#uri_mappings ⇒ Object
Returns the value of attribute uri_mappings.
19 20 21 |
# File 'lib/reddy/rdfaparser.rb', line 19 def uri_mappings @uri_mappings end |
Instance Method Details
#initialize_copy(from) ⇒ Object
Copy this Evaluation Context
34 35 36 37 38 |
# File 'lib/reddy/rdfaparser.rb', line 34 def initialize_copy(from) # clone the evaluation context correctly @uri_mappings = from.uri_mappings.clone @incomplete_triples = from.incomplete_triples.clone end |
#inspect ⇒ Object
40 41 42 43 44 45 |
# File 'lib/reddy/rdfaparser.rb', line 40 def inspect v = %w(base parent_subject parent_object language).map {|a| "#{a}='#{self.send(a).nil? ? 'nil' : self.send(a)}'"} v << "uri_mappings[#{uri_mappings.keys.length}]" v << "incomplete_triples[#{incomplete_triples.length}]" v.join(",") end |