class Shortcut

Attributes

description[RW]
key_seq[RW]
name[RW]
operating_system[RW]

Public Class Methods

all() click to toggle source
# File lib/shortcut.rb, line 34
def self.all
        @@all
end
create_from_attribute_array(attribute_array) click to toggle source
# File lib/shortcut.rb, line 21
def self.create_from_attribute_array(attribute_array)

        operating_system = OperatingSystem.find_or_create_operating_system(attribute_array[3])
        name = attribute_array[0]
        key_seq = attribute_array[1]
        description = attribute_array[2]

        shortcut = Shortcut.new(name, key_seq, description, operating_system)

        shortcut.save
        operating_system.add_shortcut(shortcut)
end
new(name, key_seq, description, operating_system) click to toggle source
# File lib/shortcut.rb, line 6
def initialize(name, key_seq, description, operating_system)
        @name = name
        @key_seq = key_seq
        @description = description
        @operating_system = operating_system
end

Public Instance Methods

operating_system=(operating_system) click to toggle source
# File lib/shortcut.rb, line 13
def operating_system=(operating_system)
        @operating_system= operating_system
end
save() click to toggle source
# File lib/shortcut.rb, line 17
def save
        @@all << self
end