Sha256: 96b17855d2ca8621fd90c88fa89e768eecc345029abcadd2d7b67bf3d53a972c

Contents?: true

Size: 534 Bytes

Versions: 3

Compression:

Stored size: 534 Bytes

Contents

module Restfulie::Common::Builder::Helpers

  def describe_member(member, options = {}, &block)
    create_builder(member, options, &block)
  end
  
  def describe_collection(collection, options = {}, &block)
    create_builder(collection, options, &block)
  end
  
  # Helper to create objects link
  def link(*args)
    Restfulie::Common::Builder::Rules::Link.new(*args)
  end
  
private

  def create_builder(object, options, &block)
    Restfulie::Common::Builder::Base.new(object, block_given? ? [block] : [], options)
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
restfulie-0.7.2 lib/restfulie/common/builder/helpers.rb
restfulie-0.7.1 lib/restfulie/common/builder/helpers.rb
restfulie-0.7.0 lib/restfulie/common/builder/helpers.rb