Class: Ynl::Models::SubMessage
- Inherits:
-
Object
- Object
- Ynl::Models::SubMessage
- Defined in:
- ynl/lib/ynl/models.rb
Defined Under Namespace
Classes: Format
Instance Attribute Summary collapse
-
#formats ⇒ Object
readonly
Returns the value of attribute formats.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:) ⇒ SubMessage
constructor
A new instance of SubMessage.
- #resolve(f) ⇒ Object
Constructor Details
#initialize(name:) ⇒ SubMessage
Returns a new instance of SubMessage.
46 47 48 49 |
# File 'ynl/lib/ynl/models.rb', line 46 def initialize(name:) @name = name @formats = [] end |
Instance Attribute Details
#formats ⇒ Object (readonly)
Returns the value of attribute formats.
44 45 46 |
# File 'ynl/lib/ynl/models.rb', line 44 def formats @formats end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
44 45 46 |
# File 'ynl/lib/ynl/models.rb', line 44 def name @name end |
Instance Method Details
#resolve(f) ⇒ Object
51 52 53 54 |
# File 'ynl/lib/ynl/models.rb', line 51 def resolve(f) formats.map! { it.resolve(f) } self end |