Class: Link

Inherits:
OpenShift::Model
  • Object
show all
Defined in:
app/models/link.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rel, method, href, required_params = nil, optional_params = nil) ⇒ Link

Returns a new instance of Link.



4
5
6
7
8
9
10
# File 'app/models/link.rb', line 4

def initialize(rel, method, href, required_params=nil, optional_params=nil)
  self.rel = rel
  self.method = method
  self.href = href.to_s
  self.required_params = required_params || Array.new
  self.optional_params = optional_params || Array.new
end

Instance Attribute Details

#hrefObject

Returns the value of attribute href.



2
3
4
# File 'app/models/link.rb', line 2

def href
  @href
end

#methodObject

Returns the value of attribute method.



2
3
4
# File 'app/models/link.rb', line 2

def method
  @method
end

#optional_paramsObject

Returns the value of attribute optional_params.



2
3
4
# File 'app/models/link.rb', line 2

def optional_params
  @optional_params
end

#relObject

Returns the value of attribute rel.



2
3
4
# File 'app/models/link.rb', line 2

def rel
  @rel
end

#required_paramsObject

Returns the value of attribute required_params.



2
3
4
# File 'app/models/link.rb', line 2

def required_params
  @required_params
end