Class: Sinatra::Rabbit::Feature::Operation
- Inherits:
-
Object
- Object
- Sinatra::Rabbit::Feature::Operation
- Defined in:
- lib/sinatra/rabbit/features.rb
Instance Attribute Summary (collapse)
-
- (Object) name
readonly
Returns the value of attribute name.
-
- (Object) params
readonly
Returns the value of attribute params.
Instance Method Summary (collapse)
-
- (Operation) initialize(name, &block)
constructor
A new instance of Operation.
- - (Object) param(*args)
- - (Object) params_array
Constructor Details
- (Operation) initialize(name, &block)
A new instance of Operation
52 53 54 55 |
# File 'lib/sinatra/rabbit/features.rb', line 52 def initialize(name, &block) @name = name @params = block end |
Instance Attribute Details
- (Object) name (readonly)
Returns the value of attribute name
49 50 51 |
# File 'lib/sinatra/rabbit/features.rb', line 49 def name @name end |
- (Object) params (readonly)
Returns the value of attribute params
50 51 52 |
# File 'lib/sinatra/rabbit/features.rb', line 50 def params @params end |
Instance Method Details
- (Object) param(*args)
63 64 65 |
# File 'lib/sinatra/rabbit/features.rb', line 63 def param(*args) @p_arr << Rabbit::Param.new(*args) end |
- (Object) params_array
57 58 59 60 61 |
# File 'lib/sinatra/rabbit/features.rb', line 57 def params_array @p_arr = [] instance_eval(&self.params) @p_arr end |