Class: FmStore::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/fm_store/field.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, type, options = {}) ⇒ Field

Returns a new instance of Field.



6
7
8
9
10
11
12
# File 'lib/fm_store/field.rb', line 6

def initialize(name, type, options = {})
  @name = name
  @fm_name = options[:fm_name] || name
  @type = type
  @searchable = options[:searchable] || false
  @identity = options[:identity] || false
end

Instance Attribute Details

#fm_nameObject (readonly)

Returns the value of attribute fm_name.



4
5
6
# File 'lib/fm_store/field.rb', line 4

def fm_name
  @fm_name
end

#identityObject (readonly)

Returns the value of attribute identity.



4
5
6
# File 'lib/fm_store/field.rb', line 4

def identity
  @identity
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/fm_store/field.rb', line 4

def name
  @name
end

#searchableObject (readonly)

Returns the value of attribute searchable.



4
5
6
# File 'lib/fm_store/field.rb', line 4

def searchable
  @searchable
end

#typeObject (readonly)

Returns the value of attribute type.



4
5
6
# File 'lib/fm_store/field.rb', line 4

def type
  @type
end