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