Class: DevCreek::Core

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/devcreek_core.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#enabledObject

Returns the value of attribute enabled.



14
15
16
# File 'lib/devcreek_core.rb', line 14

def enabled
  @enabled
end

#passwordObject

Returns the value of attribute password.



14
15
16
# File 'lib/devcreek_core.rb', line 14

def password
  @password
end

#principalObject

Returns the value of attribute principal.



14
15
16
# File 'lib/devcreek_core.rb', line 14

def principal
  @principal
end

#projectObject

Returns the value of attribute project.



14
15
16
# File 'lib/devcreek_core.rb', line 14

def project
  @project
end

#userObject

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