Class: Garage::Representer::Link
- Inherits:
-
Object
- Object
- Garage::Representer::Link
- Defined in:
- lib/garage/representer.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#rel ⇒ Object
readonly
Returns the value of attribute rel.
Instance Method Summary collapse
-
#initialize(rel, options, block) ⇒ Link
constructor
A new instance of Link.
- #pathify(representer) ⇒ Object
Constructor Details
#initialize(rel, options, block) ⇒ Link
209 210 211 |
# File 'lib/garage/representer.rb', line 209 def initialize(rel, , block) @rel, @options, @block = rel, , block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
207 208 209 |
# File 'lib/garage/representer.rb', line 207 def block @block end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
207 208 209 |
# File 'lib/garage/representer.rb', line 207 def @options end |
#rel ⇒ Object (readonly)
Returns the value of attribute rel.
207 208 209 |
# File 'lib/garage/representer.rb', line 207 def rel @rel end |
Instance Method Details
#pathify(representer) ⇒ Object
213 214 215 |
# File 'lib/garage/representer.rb', line 213 def pathify(representer) representer.instance_exec(&@block) end |