Class: MkAcl::Spec
- Inherits:
-
Object
- Object
- MkAcl::Spec
- Defined in:
- lib/mikras_utils/mkacl/spec.rb
Instance Attribute Summary collapse
-
#acl_schema ⇒ Object
readonly
Schema for generated functions to keep the application schema (relatively) clean.
-
#app_schema ⇒ Object
readonly
Application schema that contains the ACL controlled tables.
-
#file ⇒ Object
readonly
Source SPEC file.
-
#tables ⇒ Object
readonly
List of tables.
Instance Method Summary collapse
- #dump ⇒ Object
-
#initialize(file, app_schema, acl_schema) ⇒ Spec
constructor
A new instance of Spec.
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_schema ⇒ Object (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_schema ⇒ Object (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 |
#file ⇒ Object (readonly)
Source SPEC file. Only for informational purposes
8 9 10 |
# File 'lib/mikras_utils/mkacl/spec.rb', line 8 def file @file end |
#tables ⇒ Object (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
#dump ⇒ Object
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 |