Class: Jacoat::Representable::HasOne

Inherits:
Object
  • Object
show all
Defined in:
lib/jacoat/representable/has_one.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

Returns the value of attribute links.



4
5
6
# File 'lib/jacoat/representable/has_one.rb', line 4

def links
  @links
end

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/jacoat/representable/has_one.rb', line 4

def options
  @options
end

Instance Method Details



6
7
8
9
# File 'lib/jacoat/representable/has_one.rb', line 6

def link(link, &block)
  @links = {} if @links.nil?
  @links[link] = block
end