Module: Isomorfeus

Defined in:
lib/isomorfeus/data/config.rb,
lib/isomorfeus/data/reducer.rb,
lib/isomorfeus/data/version.rb,
lib/isomorfeus/data/field_support.rb,
lib/isomorfeus/data/handler/generic.rb,
lib/isomorfeus/data/generic_class_api.rb,
lib/isomorfeus/data/object_accelerator.rb,
lib/isomorfeus/data/generic_instance_api.rb

Defined Under Namespace

Modules: Data

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#data_documents_pathObject

Returns the value of attribute data_documents_path.



63
64
65
# File 'lib/isomorfeus/data/config.rb', line 63

def data_documents_path
  @data_documents_path
end

#data_object_envs_pathObject

Returns the value of attribute data_object_envs_path.



65
66
67
# File 'lib/isomorfeus/data/config.rb', line 65

def data_object_envs_path
  @data_object_envs_path
end

#data_object_idxs_pathObject

Returns the value of attribute data_object_idxs_path.



66
67
68
# File 'lib/isomorfeus/data/config.rb', line 66

def data_object_idxs_path
  @data_object_idxs_path
end

#ferret_pathObject

Returns the value of attribute ferret_path.



62
63
64
# File 'lib/isomorfeus/data/config.rb', line 62

def ferret_path
  @ferret_path
end

#files_pathObject

Returns the value of attribute files_path.



60
61
62
# File 'lib/isomorfeus/data/config.rb', line 60

def files_path
  @files_path
end

#storage_pathObject

Returns the value of attribute storage_path.



59
60
61
# File 'lib/isomorfeus/data/config.rb', line 59

def storage_path
  @storage_path
end

Instance Method Details

#add_valid_data_class(klass) ⇒ Object



43
44
45
# File 'lib/isomorfeus/data/config.rb', line 43

def add_valid_data_class(klass)
  valid_data_classes[raw_class_name(klass)] = true
end

#add_valid_file_class(klass) ⇒ Object



55
56
57
# File 'lib/isomorfeus/data/config.rb', line 55

def add_valid_file_class(klass)
  valid_file_classes[raw_class_name(klass)] = true
end

#cached_data_class(class_name) ⇒ Object



14
15
16
17
18
# File 'lib/isomorfeus/data/config.rb', line 14

def cached_data_class(class_name)
  return "::#{class_name}".constantize if Isomorfeus.development?
  return cached_data_classes.JS[class_name] if cached_data_classes.JS[class_name]
  cached_data_classes.JS[class_name] = "::#{class_name}".constantize
end

#cached_data_classesObject



10
11
12
# File 'lib/isomorfeus/data/config.rb', line 10

def cached_data_classes
  @cached_data_classes ||= `{}`
end

#instance_from_sid(sid) ⇒ Object



5
6
7
8
# File 'lib/isomorfeus/data/config.rb', line 5

def instance_from_sid(sid)
  data_class = cached_data_class(sid[0])
  data_class.new(key: sid[1], _loading: true)
end

#valid_data_class_name?(class_name) ⇒ Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/isomorfeus/data/config.rb', line 39

def valid_data_class_name?(class_name)
  valid_data_classes.key?(class_name)
end

#valid_data_classesObject



35
36
37
# File 'lib/isomorfeus/data/config.rb', line 35

def valid_data_classes
  @valid_data_classes ||= {}
end

#valid_file_class_name?(class_name) ⇒ Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/isomorfeus/data/config.rb', line 51

def valid_file_class_name?(class_name)
  valid_file_classes.key?(class_name)
end

#valid_file_classesObject



47
48
49
# File 'lib/isomorfeus/data/config.rb', line 47

def valid_file_classes
  @valid_file_classes ||= {}
end