Module: Brainstem::Concerns::Optional
- Included in:
- ApiDocs::AbstractCollection, ApiDocs::Atlas, ApiDocs::Builder, ApiDocs::Controller, ApiDocs::Endpoint, ApiDocs::Formatters::AbstractFormatter, ApiDocs::Introspectors::AbstractIntrospector, ApiDocs::Presenter, ApiDocs::Resolver, ApiDocs::Sinks::AbstractSink, Brainstem::Cli
- Defined in:
- lib/brainstem/concerns/optional.rb
Instance Method Summary collapse
- #initialize(options = {}) ⇒ Object
-
#valid_options ⇒ Array<Symbol>
The options that should be extracted and sent to the class on initialization.
Instance Method Details
#initialize(options = {}) ⇒ Object
37 38 39 |
# File 'lib/brainstem/concerns/optional.rb', line 37 def initialize( = {}) .slice(*).each {|k, v| self.send("#{k}=", v) } end |
#valid_options ⇒ Array<Symbol>
The options that should be extracted and sent to the class on initialization.
33 34 35 |
# File 'lib/brainstem/concerns/optional.rb', line 33 def [ ] end |