Class: Jacoat::Representable::HasOne
- Inherits:
-
Object
- Object
- Jacoat::Representable::HasOne
- Defined in:
- lib/jacoat/representable/has_one.rb
Instance Attribute Summary collapse
-
#links ⇒ Object
Returns the value of attribute links.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
Instance Attribute Details
#links ⇒ Object
Returns the value of attribute links.
4 5 6 |
# File 'lib/jacoat/representable/has_one.rb', line 4 def links @links end |
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/jacoat/representable/has_one.rb', line 4 def end |
Instance Method Details
#link(link, &block) ⇒ Object
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 |