Class: DevCreek::Core
- Inherits:
-
Object
- Object
- DevCreek::Core
- Includes:
- Singleton
- Defined in:
- lib/devcreek_core.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#password ⇒ Object
Returns the value of attribute password.
-
#principal ⇒ Object
Returns the value of attribute principal.
-
#project ⇒ Object
Returns the value of attribute project.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
Instance Attribute Details
#enabled ⇒ Object
Returns the value of attribute enabled.
14 15 16 |
# File 'lib/devcreek_core.rb', line 14 def enabled @enabled end |
#password ⇒ Object
Returns the value of attribute password.
14 15 16 |
# File 'lib/devcreek_core.rb', line 14 def password @password end |
#principal ⇒ Object
Returns the value of attribute principal.
14 15 16 |
# File 'lib/devcreek_core.rb', line 14 def principal @principal end |
#project ⇒ Object
Returns the value of attribute project.
14 15 16 |
# File 'lib/devcreek_core.rb', line 14 def project @project end |
#user ⇒ Object
Returns the value of attribute user.
14 15 16 |
# File 'lib/devcreek_core.rb', line 14 def user @user end |
Instance Method Details
#load(attributes = Hash.new) ⇒ Object
16 17 18 19 20 |
# File 'lib/devcreek_core.rb', line 16 def load(attributes=Hash.new) attributes.each do |key, val| instance_variable_set("@#{key}", val) end end |
#load_from_yaml(file_name) ⇒ Object
22 23 24 |
# File 'lib/devcreek_core.rb', line 22 def load_from_yaml(file_name) load(YAML.load_file(file_name)) end |