Class: RestEasy::Resource::AttributeBlockDSL

Inherits:
Object
  • Object
show all
Defined in:
lib/rest_easy/resource.rb

Overview

── DSL helper for attribute parse/serialise blocks ─────────────────

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#parse_blockObject (readonly)

Returns the value of attribute parse_block.



64
65
66
# File 'lib/rest_easy/resource.rb', line 64

def parse_block
  @parse_block
end

#serialise_blockObject (readonly)

Returns the value of attribute serialise_block.



64
65
66
# File 'lib/rest_easy/resource.rb', line 64

def serialise_block
  @serialise_block
end

Instance Method Details

#parse(&block) ⇒ Object



66
67
68
# File 'lib/rest_easy/resource.rb', line 66

def parse(&block)
  @parse_block = block
end

#serialise(&block) ⇒ Object



70
71
72
# File 'lib/rest_easy/resource.rb', line 70

def serialise(&block)
  @serialise_block = block
end