Class: MkAcl::Spec

Inherits:
Object
  • Object
show all
Defined in:
lib/mikras_utils/mkacl/spec.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, app_schema, acl_schema) ⇒ Spec

Returns a new instance of Spec.



24
25
26
27
28
29
30
# File 'lib/mikras_utils/mkacl/spec.rb', line 24

def initialize(file, app_schema, acl_schema)
  @file = file
  @app_schema = app_schema
  @acl_schema = acl_schema
  @tables = []
  @table_hash = {}
end

Instance Attribute Details

#acl_schemaObject (readonly)

Schema for generated functions to keep the application schema (relatively) clean



15
16
17
# File 'lib/mikras_utils/mkacl/spec.rb', line 15

def acl_schema
  @acl_schema
end

#app_schemaObject (readonly)

Application schema that contains the ACL controlled tables



11
12
13
# File 'lib/mikras_utils/mkacl/spec.rb', line 11

def app_schema
  @app_schema
end

#fileObject (readonly)

Source SPEC file. Only for informational purposes



8
9
10
# File 'lib/mikras_utils/mkacl/spec.rb', line 8

def file
  @file
end

#tablesObject (readonly)

List of tables. Maintained by #attach_table



18
19
20
# File 'lib/mikras_utils/mkacl/spec.rb', line 18

def tables
  @tables
end

Instance Method Details

#dumpObject



32
33
34
35
36
37
38
39
# File 'lib/mikras_utils/mkacl/spec.rb', line 32

def dump
  puts "Schema"
  indent {
    puts "app_schema: #{app_schema}"
    puts "acl_schema: #{acl_schema}"
    tables.map(&:dump)
  }
end