Class: Ynl::Models::Struct
- Inherits:
-
Object
- Object
- Ynl::Models::Struct
- Defined in:
- 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.
89 90 91 92 93 |
# File 'lib/ynl/models.rb', line 89 def initialize(name:, doc:) @name = name @members = [] @doc = doc end |
Instance Attribute Details
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
87 88 89 |
# File 'lib/ynl/models.rb', line 87 def doc @doc end |
#members ⇒ Object (readonly)
Returns the value of attribute members.
87 88 89 |
# File 'lib/ynl/models.rb', line 87 def members @members end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
87 88 89 |
# File 'lib/ynl/models.rb', line 87 def name @name end |
Instance Method Details
#resolve(f) ⇒ Object
95 96 97 98 |
# File 'lib/ynl/models.rb', line 95 def resolve(f) @members.map! {|m| m.resolve(f) } self end |