Module: Saxon::XPath::StaticContext::Common
- Included in:
- Saxon::XPath::StaticContext, DSL
- Defined in:
- lib/saxon/xpath/static_context.rb
Overview
methods used by both Saxon::XPath::StaticContext and DSL
Instance Method Summary collapse
-
#args_hash ⇒ Hash<Symbol => Hash,null>
returns the context details in a hash suitable for initializing a new one.
- #initialize(args = {}) ⇒ Object
Instance Method Details
#args_hash ⇒ Hash<Symbol => Hash,null>
returns the context details in a hash suitable for initializing a new one
35 36 37 38 39 40 41 |
# File 'lib/saxon/xpath/static_context.rb', line 35 def args_hash { declared_namespaces: @declared_namespaces, declared_variables: @declared_variables, default_collation: @default_collation } end |
#initialize(args = {}) ⇒ Object
27 28 29 30 31 |
# File 'lib/saxon/xpath/static_context.rb', line 27 def initialize(args = {}) @declared_variables = args.fetch(:declared_variables, {}).freeze @declared_namespaces = args.fetch(:declared_namespaces, {}).freeze @default_collation = args.fetch(:default_collation, nil).freeze end |