Module: Redistat::Options

Included in:
Event, Key, Label, Model
Defined in:
lib/redistat/mixins/options.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) included(base)



4
5
6
# File 'lib/redistat/mixins/options.rb', line 4

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

- (Object) default_options



28
29
30
# File 'lib/redistat/mixins/options.rb', line 28

def default_options
  {}
end

- (Object) options



32
33
34
# File 'lib/redistat/mixins/options.rb', line 32

def options
  @options ||= {}
end

- (Object) parse_options(opts)



22
23
24
25
26
# File 'lib/redistat/mixins/options.rb', line 22

def parse_options(opts)
  opts ||= {}
  @raw_options = opts
  @options = default_options.merge(opts.reject { |k,v| v.nil? })
end

- (Object) raw_options



36
37
38
# File 'lib/redistat/mixins/options.rb', line 36

def raw_options
  @raw_options ||= {}
end