Class: Garage::Representer::Link

Inherits:
Object
  • Object
show all
Defined in:
lib/garage/representer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options, block)
  @rel, @options, @block = rel, options, block
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



204
205
206
# File 'lib/garage/representer.rb', line 204

def block
  @block
end

#optionsObject (readonly)

Returns the value of attribute options.



204
205
206
# File 'lib/garage/representer.rb', line 204

def options
  @options
end

#relObject (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