Class: Marshalsea::Psych::Limits
- Inherits:
-
Object
- Object
- Marshalsea::Psych::Limits
- Defined in:
- lib/marshalsea/psych/inspector.rb
Constant Summary collapse
- DEFAULT_MAX_BYTES =
1_048_576- DEFAULT_MAX_DEPTH =
64- DEFAULT_MAX_NODES =
10_000- DEFAULT_MAX_ALIASES =
64- DEFAULT_MAX_DOCUMENTS =
8- ROLE_BYTES =
"document bytes"- ROLE_DEPTH =
"nesting depth"- ROLE_NODES =
"nodes"- ROLE_ALIASES =
"aliases"- ROLE_DOCUMENTS =
"documents"
Instance Attribute Summary collapse
-
#max_aliases ⇒ Object
readonly
Returns the value of attribute max_aliases.
-
#max_bytes ⇒ Object
readonly
Returns the value of attribute max_bytes.
-
#max_depth ⇒ Object
readonly
Returns the value of attribute max_depth.
-
#max_documents ⇒ Object
readonly
Returns the value of attribute max_documents.
-
#max_nodes ⇒ Object
readonly
Returns the value of attribute max_nodes.
Instance Method Summary collapse
-
#initialize(max_bytes: DEFAULT_MAX_BYTES, max_depth: DEFAULT_MAX_DEPTH, max_nodes: DEFAULT_MAX_NODES, max_aliases: DEFAULT_MAX_ALIASES, max_documents: DEFAULT_MAX_DOCUMENTS) ⇒ Limits
constructor
A new instance of Limits.
Constructor Details
#initialize(max_bytes: DEFAULT_MAX_BYTES, max_depth: DEFAULT_MAX_DEPTH, max_nodes: DEFAULT_MAX_NODES, max_aliases: DEFAULT_MAX_ALIASES, max_documents: DEFAULT_MAX_DOCUMENTS) ⇒ Limits
Returns a new instance of Limits.
65 66 67 68 69 70 71 72 73 |
# File 'lib/marshalsea/psych/inspector.rb', line 65 def initialize(max_bytes: DEFAULT_MAX_BYTES, max_depth: DEFAULT_MAX_DEPTH, max_nodes: DEFAULT_MAX_NODES, max_aliases: DEFAULT_MAX_ALIASES, max_documents: DEFAULT_MAX_DOCUMENTS) @max_bytes = max_bytes @max_depth = max_depth @max_nodes = max_nodes @max_aliases = max_aliases @max_documents = max_documents end |
Instance Attribute Details
#max_aliases ⇒ Object (readonly)
Returns the value of attribute max_aliases.
63 64 65 |
# File 'lib/marshalsea/psych/inspector.rb', line 63 def max_aliases @max_aliases end |
#max_bytes ⇒ Object (readonly)
Returns the value of attribute max_bytes.
63 64 65 |
# File 'lib/marshalsea/psych/inspector.rb', line 63 def max_bytes @max_bytes end |
#max_depth ⇒ Object (readonly)
Returns the value of attribute max_depth.
63 64 65 |
# File 'lib/marshalsea/psych/inspector.rb', line 63 def max_depth @max_depth end |
#max_documents ⇒ Object (readonly)
Returns the value of attribute max_documents.
63 64 65 |
# File 'lib/marshalsea/psych/inspector.rb', line 63 def max_documents @max_documents end |
#max_nodes ⇒ Object (readonly)
Returns the value of attribute max_nodes.
63 64 65 |
# File 'lib/marshalsea/psych/inspector.rb', line 63 def max_nodes @max_nodes end |