Class: Xdt::FieldType

Inherits:
Object
  • Object
show all
Defined in:
lib/xdt/xdt_fields.rb

Instance Method Summary collapse

Constructor Details

#initialize(id, name, title, length, type = :string) ⇒ FieldType

Returns a new instance of FieldType.



5
6
7
8
9
10
# File 'lib/xdt/xdt_fields.rb', line 5

def initialize(id, name, title, length, type = :string)
  @id = id.to_i
  @name = name
  @title = title
  @type = type
end

Instance Method Details

#valid?(contents) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/xdt/xdt_fields.rb', line 12

def valid?(contents)
  true
end