Class: Ynl::Models::Struct
- Inherits:
-
Object
- Object
- Ynl::Models::Struct
- Defined in:
- ynl/lib/ynl/models.rb
Defined Under Namespace
Classes: Member
Instance Attribute Summary collapse
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
-
#members ⇒ Object
readonly
Returns the value of attribute members.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, doc:) ⇒ Struct
constructor
A new instance of Struct.
- #resolve(f) ⇒ Object
Constructor Details
#initialize(name:, doc:) ⇒ Struct
Returns a new instance of Struct.
99 100 101 102 103 |
# File 'ynl/lib/ynl/models.rb', line 99 def initialize(name:, doc:) @name = name @members = [] @doc = doc end |
Instance Attribute Details
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
97 98 99 |
# File 'ynl/lib/ynl/models.rb', line 97 def doc @doc end |
#members ⇒ Object (readonly)
Returns the value of attribute members.
97 98 99 |
# File 'ynl/lib/ynl/models.rb', line 97 def members @members end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
97 98 99 |
# File 'ynl/lib/ynl/models.rb', line 97 def name @name end |
Instance Method Details
#resolve(f) ⇒ Object
105 106 107 108 |
# File 'ynl/lib/ynl/models.rb', line 105 def resolve(f) @members.map! {|m| m.resolve(f) } self end |