Class: Rgviz::Format
- Inherits:
-
Object
- Object
- Rgviz::Format
- Defined in:
- lib/rgviz/nodes.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
Returns the value of attribute column.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(column, pattern) ⇒ Format
constructor
A new instance of Format.
- #to_s ⇒ Object
Constructor Details
#initialize(column, pattern) ⇒ Format
Returns a new instance of Format.
180 181 182 183 |
# File 'lib/rgviz/nodes.rb', line 180 def initialize(column, pattern) @column = column @pattern = pattern end |
Instance Attribute Details
#column ⇒ Object
Returns the value of attribute column.
177 178 179 |
# File 'lib/rgviz/nodes.rb', line 177 def column @column end |
#pattern ⇒ Object
Returns the value of attribute pattern.
178 179 180 |
# File 'lib/rgviz/nodes.rb', line 178 def pattern @pattern end |
Instance Method Details
#accept(visitor) ⇒ Object
185 186 187 188 189 190 |
# File 'lib/rgviz/nodes.rb', line 185 def accept(visitor) if visitor.visit_format(self) column.accept visitor end visitor.end_visit_format self end |
#to_s ⇒ Object
192 193 194 |
# File 'lib/rgviz/nodes.rb', line 192 def to_s "#{column} `#{pattern}`" end |