Class: ViewSpec::Types::Symbol

Inherits:
ViewSpec::Type show all
Defined in:
lib/view_spec/types/symbol.rb

Constant Summary

Constants inherited from ViewSpec::Type

ViewSpec::Type::TYPES

Instance Method Summary collapse

Methods inherited from ViewSpec::Type

for, #initialize, #type

Constructor Details

This class inherits a constructor from ViewSpec::Type

Instance Method Details

#cast(value) ⇒ Object



4
5
6
# File 'lib/view_spec/types/symbol.rb', line 4

def cast(value)
  value&.to_sym
end