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
Returns a new instance of Link.
206 207 208 |
# File 'lib/garage/representer.rb', line 206 def initialize(rel, , block) @rel, @options, @block = rel, , block end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
204 205 206 |
# File 'lib/garage/representer.rb', line 204 def block @block end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
204 205 206 |
# File 'lib/garage/representer.rb', line 204 def @options end |
#rel ⇒ Object (readonly)
Returns the value of attribute rel.
204 205 206 |
# File 'lib/garage/representer.rb', line 204 def rel @rel end |
Instance Method Details
#pathify(representer) ⇒ Object
210 211 212 |
# File 'lib/garage/representer.rb', line 210 def pathify(representer) representer.instance_exec(&@block) end |