Class: Fop::Nodes::Expression
- Inherits:
-
Struct
- Object
- Struct
- Fop::Nodes::Expression
- Defined in:
- lib/fop/nodes.rb
Instance Attribute Summary collapse
-
#arg ⇒ Object
Returns the value of attribute arg.
-
#match ⇒ Object
Returns the value of attribute match.
-
#operator ⇒ Object
Returns the value of attribute operator.
-
#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
#arg ⇒ Object
Returns the value of attribute arg
17 18 19 |
# File 'lib/fop/nodes.rb', line 17 def arg @arg end |
#match ⇒ Object
Returns the value of attribute match
17 18 19 |
# File 'lib/fop/nodes.rb', line 17 def match @match end |
#operator ⇒ Object
Returns the value of attribute operator
17 18 19 |
# File 'lib/fop/nodes.rb', line 17 def operator @operator 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 arg_str = arg .map { |a| a.is_a?(Integer) ? "$#{a+1}" : a.to_s } .join("") s << " #{operator} #{arg_str}" end s end |