Replies: 3 comments 1 reply
-
You do get a |
Beta Was this translation helpful? Give feedback.
-
+1. I just introduced Literal to our main application and was wondering if we could have a My workaround so far was inheriting from Literal::Struct and use to_h.slice(...) inside the object, but I feel that's no very intuitive. Ideally, I would like to inherit from Literal::Object and use What do you think @joeldrapper? |
Beta Was this translation helpful? Give feedback.
-
Ahh, I would love to have this as well. I actually thought this was available from literal/lib/literal/properties.rb Line 61 in dca4714 My use case is for Phlex components to be able to easily log their properties in development, similar to how React dev tools let you see the props of a React component. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Idea
Add a simple
literal_properties
instance method that returns aLiteral::Hash
containing all defined properties and their current values. This makes it easy to get a snapshot of an object's current state in a type-safe way.Example
Beta Was this translation helpful? Give feedback.
All reactions