Class: EY::Serverside::Adapter::Arguments
- Inherits:
-
Object
- Object
- EY::Serverside::Adapter::Arguments
- Defined in:
- lib/engineyard-serverside-adapter/arguments.rb
Overview
A mutable arguments receiver that fails fast when bad values are given.
Instance Attribute Summary collapse
-
#clean ⇒ Object
Returns the value of attribute clean.
-
#config ⇒ Object
Returns the value of attribute config.
-
#ignore_existing ⇒ Object
Returns the value of attribute ignore_existing.
-
#instance_names ⇒ Object
readonly
Returns the value of attribute instance_names.
-
#instance_roles ⇒ Object
readonly
Returns the value of attribute instance_roles.
-
#instances ⇒ Object
Returns the value of attribute instances.
-
#migrate ⇒ Object
Returns the value of attribute migrate.
-
#serverside_version ⇒ Object
Returns the value of attribute serverside_version.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#clean ⇒ Object
Returns the value of attribute clean.
24 25 26 |
# File 'lib/engineyard-serverside-adapter/arguments.rb', line 24 def clean @clean end |
#config ⇒ Object
Returns the value of attribute config.
24 25 26 |
# File 'lib/engineyard-serverside-adapter/arguments.rb', line 24 def config @config end |
#ignore_existing ⇒ Object
Returns the value of attribute ignore_existing.
24 25 26 |
# File 'lib/engineyard-serverside-adapter/arguments.rb', line 24 def ignore_existing @ignore_existing end |
#instance_names ⇒ Object (readonly)
Returns the value of attribute instance_names.
26 27 28 |
# File 'lib/engineyard-serverside-adapter/arguments.rb', line 26 def instance_names @instance_names end |
#instance_roles ⇒ Object (readonly)
Returns the value of attribute instance_roles.
26 27 28 |
# File 'lib/engineyard-serverside-adapter/arguments.rb', line 26 def instance_roles @instance_roles end |
#instances ⇒ Object
Returns the value of attribute instances.
26 27 28 |
# File 'lib/engineyard-serverside-adapter/arguments.rb', line 26 def instances @instances end |
#migrate ⇒ Object
Returns the value of attribute migrate.
24 25 26 |
# File 'lib/engineyard-serverside-adapter/arguments.rb', line 24 def migrate @migrate end |
#serverside_version ⇒ Object
Returns the value of attribute serverside_version.
24 25 26 |
# File 'lib/engineyard-serverside-adapter/arguments.rb', line 24 def serverside_version @serverside_version end |
#verbose ⇒ Object
Returns the value of attribute verbose.
24 25 26 |
# File 'lib/engineyard-serverside-adapter/arguments.rb', line 24 def verbose @verbose end |
Class Method Details
.nonempty_attr_accessor(*names) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/engineyard-serverside-adapter/arguments.rb', line 8 def self.nonempty_attr_accessor(*names) attr_reader *names names.each do |name| define_method(:"#{name}=") do |value| if value.nil? || value.to_s.empty? raise ArgumentError, "Value for '#{name}' must be non-empty." end instance_variable_set("@#{name}", value) end end end |
Instance Method Details
#[](key) ⇒ Object
29 30 31 |
# File 'lib/engineyard-serverside-adapter/arguments.rb', line 29 def [](key) send(key) end |