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.
150 151 152 153 |
# File 'lib/aws-sdk-resources/operations.rb', line 150 def initialize( = {}) @builder = option(:builder, ) super end |
Instance Attribute Details
#builder ⇒ Builder (readonly)
156 157 158 |
# File 'lib/aws-sdk-resources/operations.rb', line 156 def builder @builder end |
Instance Method Details
#arity ⇒ Object
169 170 171 |
# File 'lib/aws-sdk-resources/operations.rb', line 169 def arity @builder.sources.count { |s| BuilderSources::Argument === s } end |
#call(options) ⇒ Resource
160 161 162 163 164 165 166 167 |
# File 'lib/aws-sdk-resources/operations.rb', line 160 def call() if argc() == arity @builder.build() else msg = "wrong number of arguments (#{argc()} for #{arity})" raise ArgumentError, msg end end |