Class: JunglePath::Gen::SchemaTree::MatchTableData

Inherits:
Object
  • Object
show all
Defined in:
lib/jungle_path/gen/schema_tree/match_table_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#columnsObject (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

#nameObject (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

#regexpObject (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

Returns:

  • (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_sObject



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