Class: Aws::Resources::Operations::HasOperation
- Defined in:
- lib/aws-sdk-resources/operations.rb
Instance Attribute Summary collapse
- #builder ⇒ Builder readonly
Attributes inherited from Base
Instance Method Summary collapse
- #arity ⇒ Object
- #call(options) ⇒ Resource
-
#initialize(options = {}) ⇒ HasOperation
constructor
A new instance of HasOperation.
Constructor Details
#initialize(options = {}) ⇒ HasOperation
Returns a new instance of HasOperation.
167 168 169 170 |
# File 'lib/aws-sdk-resources/operations.rb', line 167 def initialize( = {}) @builder = option(:builder, ) super end |
Instance Attribute Details
#builder ⇒ Builder (readonly)
173 174 175 |
# File 'lib/aws-sdk-resources/operations.rb', line 173 def builder @builder end |
Instance Method Details
#arity ⇒ Object
186 187 188 |
# File 'lib/aws-sdk-resources/operations.rb', line 186 def arity @builder.sources.count { |s| BuilderSources::Argument === s } end |
#call(options) ⇒ Resource
177 178 179 180 181 182 183 184 |
# File 'lib/aws-sdk-resources/operations.rb', line 177 def call() if argc() == arity @builder.build() else msg = "wrong number of arguments (#{argc()} for #{arity})" raise ArgumentError, msg end end |