Class: Vop::ThingWithParams

Inherits:
Object
  • Object
show all
Defined in:
lib/vop/objects/thing_with_params.rb

Direct Known Subclasses

Plugin

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeThingWithParams

Returns a new instance of ThingWithParams.



7
8
9
# File 'lib/vop/objects/thing_with_params.rb', line 7

def initialize
  @params = []
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



5
6
7
# File 'lib/vop/objects/thing_with_params.rb', line 5

def params
  @params
end

Instance Method Details

#param(name) ⇒ Object



11
12
13
# File 'lib/vop/objects/thing_with_params.rb', line 11

def param(name)
  @params.select { |x| x.name == name }.first
end