Class: Ynl::Models::Enum
- Inherits:
-
Object
- Object
- Ynl::Models::Enum
- Defined in:
- lib/ynl/models.rb
Defined Under Namespace
Classes: Entry
Instance Attribute Summary collapse
-
#doc ⇒ Object
readonly
Returns the value of attribute doc.
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, doc:) ⇒ Enum
constructor
A new instance of Enum.
- #resolve(f) ⇒ Object
Constructor Details
#initialize(name:, doc:) ⇒ Enum
Returns a new instance of Enum.
52 53 54 55 56 |
# File 'lib/ynl/models.rb', line 52 def initialize(name:, doc:) @name = name @entries = [] @doc = doc end |
Instance Attribute Details
#doc ⇒ Object (readonly)
Returns the value of attribute doc.
50 51 52 |
# File 'lib/ynl/models.rb', line 50 def doc @doc end |
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
50 51 52 |
# File 'lib/ynl/models.rb', line 50 def entries @entries end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
50 51 52 |
# File 'lib/ynl/models.rb', line 50 def name @name end |
Instance Method Details
#resolve(f) ⇒ Object
58 59 60 |
# File 'lib/ynl/models.rb', line 58 def resolve(f) self end |