class Shaf::Profile::Relation

Attributes

content_type[R]
doc[R]
href[R]
http_methods[R]
name[R]
parent[R]
payload_type[R]

Public Class Methods

new(name, **opts) click to toggle source
# File lib/shaf/profile/relation.rb, line 12
def initialize(name, **opts)
  @name = name.to_sym
  @doc = opts[:doc].freeze
  @href = opts[:href].freeze
  http_methods = Array(opts[:http_method]) + Array(opts[:http_methods])
  http_methods  << 'GET' if http_methods.empty?
  @http_methods = http_methods.map { |m| m.to_s.upcase }.uniq.freeze
  @payload_type = opts[:payload_type].freeze
  @content_type = opts[:content_type].freeze
  @parent = opts[:parent]
end

Public Instance Methods

attributes() click to toggle source
# File lib/shaf/profile/relation.rb, line 24
def attributes
  @attributes ||= []
end