Class: CodeToQuery::Context::Pack
- Inherits:
-
Object
- Object
- CodeToQuery::Context::Pack
- Defined in:
- lib/code_to_query/context/pack.rb
Instance Attribute Summary collapse
-
#glossary ⇒ Object
readonly
Returns the value of attribute glossary.
-
#hints ⇒ Object
readonly
Returns the value of attribute hints.
-
#models ⇒ Object
readonly
Returns the value of attribute models.
-
#policies ⇒ Object
readonly
Returns the value of attribute policies.
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
-
#initialize(schema:, models:, glossary:, policies:, hints:) ⇒ Pack
constructor
A new instance of Pack.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(schema:, models:, glossary:, policies:, hints:) ⇒ Pack
Returns a new instance of Pack.
13 14 15 16 17 18 19 |
# File 'lib/code_to_query/context/pack.rb', line 13 def initialize(schema:, models:, glossary:, policies:, hints:) @schema = schema @models = models @glossary = glossary @policies = policies @hints = hints end |
Instance Attribute Details
#glossary ⇒ Object (readonly)
Returns the value of attribute glossary.
11 12 13 |
# File 'lib/code_to_query/context/pack.rb', line 11 def glossary @glossary end |
#hints ⇒ Object (readonly)
Returns the value of attribute hints.
11 12 13 |
# File 'lib/code_to_query/context/pack.rb', line 11 def hints @hints end |
#models ⇒ Object (readonly)
Returns the value of attribute models.
11 12 13 |
# File 'lib/code_to_query/context/pack.rb', line 11 def models @models end |
#policies ⇒ Object (readonly)
Returns the value of attribute policies.
11 12 13 |
# File 'lib/code_to_query/context/pack.rb', line 11 def policies @policies end |
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
11 12 13 |
# File 'lib/code_to_query/context/pack.rb', line 11 def schema @schema end |
Instance Method Details
#to_h ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/code_to_query/context/pack.rb', line 21 def to_h { schema: @schema, models: @models, glossary: @glossary, policies: @policies, hints: @hints } end |
#to_json(*args) ⇒ Object
31 32 33 |
# File 'lib/code_to_query/context/pack.rb', line 31 def to_json(*args) JSON.pretty_generate(to_h, *args) end |