Class: TheSchemaIs::Cops::Parser::Column

Inherits:
Struct
  • Object
show all
Defined in:
lib/the_schema_is/cops/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#definitionObject

Returns the value of attribute definition

Returns:

  • (Object)

    the current value of definition



23
24
25
# File 'lib/the_schema_is/cops/parser.rb', line 23

def definition
  @definition
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



23
24
25
# File 'lib/the_schema_is/cops/parser.rb', line 23

def name
  @name
end

#sourceObject

Returns the value of attribute source

Returns:

  • (Object)

    the current value of source



23
24
25
# File 'lib/the_schema_is/cops/parser.rb', line 23

def source
  @source
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



23
24
25
# File 'lib/the_schema_is/cops/parser.rb', line 23

def type
  @type
end

Instance Method Details

#definition_sourceObject



24
25
26
27
28
# File 'lib/the_schema_is/cops/parser.rb', line 24

def definition_source
  return unless definition

  eval('{' + definition.loc.expression.source + '}') # rubocop:disable Security/Eval,Style/StringConcatenation
end