Class: RmsApiRuby::Configuration::Option
- Inherits:
-
Object
- Object
- RmsApiRuby::Configuration::Option
- Defined in:
- lib/rms_api_ruby/config.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize(configuration, name, options = {}) ⇒ Option
constructor
A new instance of Option.
Constructor Details
#initialize(configuration, name, options = {}) ⇒ Option
Returns a new instance of Option.
36 37 38 39 40 41 |
# File 'lib/rms_api_ruby/config.rb', line 36 def initialize(configuration, name, = {}) @configuration = configuration @name = name = @default = .fetch(:default, nil) end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
30 31 32 |
# File 'lib/rms_api_ruby/config.rb', line 30 def configuration @configuration end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
30 31 32 |
# File 'lib/rms_api_ruby/config.rb', line 30 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
30 31 32 |
# File 'lib/rms_api_ruby/config.rb', line 30 def end |
Class Method Details
.define(*args) ⇒ Object
32 33 34 |
# File 'lib/rms_api_ruby/config.rb', line 32 def self.define(*args) new(*args).define end |
Instance Method Details
#define ⇒ Object
43 44 45 46 47 |
# File 'lib/rms_api_ruby/config.rb', line 43 def define write_attribute define_method if default_provided? self end |