Class: JunglePath::Gen::SchemaTree::MatchTableData
- Inherits:
-
Object
- Object
- JunglePath::Gen::SchemaTree::MatchTableData
- Defined in:
- lib/jungle_path/gen/schema_tree/match_table_data.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#regexp ⇒ Object
readonly
Returns the value of attribute regexp.
Instance Method Summary collapse
-
#initialize(name, columns) ⇒ MatchTableData
constructor
A new instance of MatchTableData.
- #nil_columns? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(name, columns) ⇒ MatchTableData
Returns a new instance of MatchTableData.
7 8 9 10 11 |
# File 'lib/jungle_path/gen/schema_tree/match_table_data.rb', line 7 def initialize name, columns @name = name @columns = JunglePath::Gen::SchemaTree::MatchColumns.new(columns) @regexp = @name if @name and @name.class == Regexp end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
6 7 8 |
# File 'lib/jungle_path/gen/schema_tree/match_table_data.rb', line 6 def columns @columns end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/jungle_path/gen/schema_tree/match_table_data.rb', line 6 def name @name end |
#regexp ⇒ Object (readonly)
Returns the value of attribute regexp.
6 7 8 |
# File 'lib/jungle_path/gen/schema_tree/match_table_data.rb', line 6 def regexp @regexp end |
Instance Method Details
#nil_columns? ⇒ Boolean
13 14 15 |
# File 'lib/jungle_path/gen/schema_tree/match_table_data.rb', line 13 def nil_columns? @columns.is_nil end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/jungle_path/gen/schema_tree/match_table_data.rb', line 17 def to_s "name: #{@name}, columns: #{@columns}, regexp: #{@regexp}." end |