Class: HashCast::AttributesParser
- Inherits:
-
Object
- Object
- HashCast::AttributesParser
- Defined in:
- lib/hash_cast/attributes_parser.rb
Overview
Parses caster rules and returns list of HashCast::Metadata::Attribute instances which contains casting rules
Defined Under Namespace
Classes: DSL
Class Method Summary collapse
-
.parse(&block) ⇒ Object
Performs casting.
Class Method Details
.parse(&block) ⇒ Object
Performs casting
9 10 11 12 13 |
# File 'lib/hash_cast/attributes_parser.rb', line 9 def self.parse(&block) dsl = DSL.new dsl.instance_exec(&block) dsl.attributes end |