Class: Fop::Nodes::Expression
- Inherits:
-
Struct
- Object
- Struct
- Fop::Nodes::Expression
- Defined in:
- lib/fop/nodes.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#match ⇒ Object
Returns the value of attribute match.
-
#operator_token ⇒ Object
Returns the value of attribute operator_token.
-
#regex ⇒ Object
Returns the value of attribute regex.
-
#regex_match ⇒ Object
Returns the value of attribute regex_match.
-
#wildcard ⇒ Object
Returns the value of attribute wildcard.
Instance Method Summary collapse
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args
17 18 19 |
# File 'lib/fop/nodes.rb', line 17 def args @args end |
#match ⇒ Object
Returns the value of attribute match
17 18 19 |
# File 'lib/fop/nodes.rb', line 17 def match @match end |
#operator_token ⇒ Object
Returns the value of attribute operator_token
17 18 19 |
# File 'lib/fop/nodes.rb', line 17 def operator_token @operator_token end |
#regex ⇒ Object
Returns the value of attribute regex
17 18 19 |
# File 'lib/fop/nodes.rb', line 17 def regex @regex end |
#regex_match ⇒ Object
Returns the value of attribute regex_match
17 18 19 |
# File 'lib/fop/nodes.rb', line 17 def regex_match @regex_match end |
#wildcard ⇒ Object
Returns the value of attribute wildcard
17 18 19 |
# File 'lib/fop/nodes.rb', line 17 def wildcard @wildcard end |
Instance Method Details
#to_s ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/fop/nodes.rb', line 18 def to_s w = wildcard ? "*" : nil s = "[#{w}exp] #{match}" if operator_token arg_str = args .map { |a| a.is_a?(Integer) ? "$#{a+1}" : a.to_s } .join("") s << " #{operator_token.val} #{arg_str}" end s end |