Class: Rubiderella::Assistant

Inherits:
Person
  • Object
show all
Defined in:
lib/rubiderella/assistant.rb,
lib/rubiderella/assistant/name.rb,
lib/rubiderella/assistant/birthday.rb

Defined Under Namespace

Classes: Birthday, Name

Instance Attribute Summary

Attributes inherited from Person

#age, #birthday, #blood, #bust, #cv, #favorite, #from, #handed, #height, #hip, #name, #sign, #type, #waist, #weight

Class Method Summary collapse

Methods inherited from Person

all, #initialize, names, valid?

Constructor Details

This class inherits a constructor from Rubiderella::Person

Class Method Details

.configObject



6
7
8
9
10
# File 'lib/rubiderella/assistant.rb', line 6

def config
  @config = Dir.glob("#{File.dirname(__FILE__)}/../../config/assistant/*.yml").each_with_object({}) do |file, idols|
    idols.merge!(YAML.load_file(file))
  end.deep_symbolize_keys
end

.find_by_key(key) ⇒ Object



12
13
14
15
16
# File 'lib/rubiderella/assistant.rb', line 12

def find_by_key(key)
  raise UnknownAssistantError unless valid?(key)

  new(@config[key])
end