Class: Apia::DSLs::Scalar

Inherits:
Apia::DSL show all
Defined in:
lib/apia/dsls/scalar.rb

Instance Method Summary collapse

Methods inherited from Apia::DSL

#description, #initialize, #name, #no_schema

Constructor Details

This class inherits a constructor from Apia::DSL

Instance Method Details

#cast(&block) ⇒ Object



9
10
11
# File 'lib/apia/dsls/scalar.rb', line 9

def cast(&block)
  @definition.cast = block
end

#parse(&block) ⇒ Object



13
14
15
# File 'lib/apia/dsls/scalar.rb', line 13

def parse(&block)
  @definition.parse = block
end

#validator(&block) ⇒ Object



17
18
19
# File 'lib/apia/dsls/scalar.rb', line 17

def validator(&block)
  @definition.validator = block
end