Class: Configurations::Maps::Types::Entry
- Inherits:
-
Object
- Object
- Configurations::Maps::Types::Entry
- Defined in:
- lib/configurations/maps/types.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type) ⇒ Entry
constructor
A new instance of Entry.
- #valid?(value) ⇒ Boolean
Constructor Details
#initialize(type) ⇒ Entry
Returns a new instance of Entry.
8 9 10 |
# File 'lib/configurations/maps/types.rb', line 8 def initialize(type) @type = type end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/configurations/maps/types.rb', line 6 def type @type end |
Instance Method Details
#valid?(value) ⇒ Boolean
12 13 14 |
# File 'lib/configurations/maps/types.rb', line 12 def valid?(value) !@type || value.is_a?(@type) end |