Class: Configurations::Maps::Types::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/configurations/maps/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#typeObject (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

Returns:

  • (Boolean)


12
13
14
# File 'lib/configurations/maps/types.rb', line 12

def valid?(value)
  !@type || value.is_a?(@type)
end