class Contentful::Bootstrap::Templates::Links::Base
Attributes
id[R]
Public Class Methods
new(id)
click to toggle source
# File lib/contentful/bootstrap/templates/links/base.rb, line 9 def initialize(id) @id = id end
Public Instance Methods
==(other)
click to toggle source
# File lib/contentful/bootstrap/templates/links/base.rb, line 31 def ==(other) return false unless other.is_a? self.class other.id == id end
link_type()
click to toggle source
# File lib/contentful/bootstrap/templates/links/base.rb, line 13 def link_type self.class.name.split('::').last end
management_class()
click to toggle source
# File lib/contentful/bootstrap/templates/links/base.rb, line 27 def management_class raise 'must implement' end
to_management_object()
click to toggle source
# File lib/contentful/bootstrap/templates/links/base.rb, line 21 def to_management_object object = management_class.new object.id = id object end
type()
click to toggle source
# File lib/contentful/bootstrap/templates/links/base.rb, line 17 def type Contentful::Management::ContentType::LINK end