Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 250', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Stuct is a abstract class that collects named attributes bundled in an object. You have to generate your own Struct class subclass of Struct using Struct new which returns new Struct class. Example S Struct new foo bar s S new 1 2 1 5 update the member 5 s S foo 1 bar 5 Included Module Enumerable Class Method Struct new name mem. Creates a new structure class containing members specified by mem. . If name is given the structure class is bound to the constant under Struct for example Struct Passwd. Note that Struct new doesn t return a structure object itself but rather a class that is used as a template for creating each structure. Structure Class Methods S members Returns an array of member names. S new value. Creates a new structure object. value objects specify the initial value of each member and must match the number of members specified when the structure was created. Instance Methods s mem Returns the value of member mem where mem is a symbol or integer. If mem is an integer the value of the memth member is returned. s mem value Sets the value of member mem. mem may be a symbol or integer. x . Calls block once for each member. Returns an array of member names. Returns an array containing the value of each member. Time Time class Time is an object corresponding to a certain time. Internally it s stored as a number of seconds since the epoch 00 00 00 January 1 1970 UTC. Time class can handle both a system s local time and UTC at the same time but no other time zones can be handled. Included Module Comparable Class Methods Time at time usec 0 Creates a Time object. time may be a Time object or an integer representing the number of seconds elapsed since the epoch 00 00 00 January 1 1970 UTC. Time gm year month 1 day 1 hour 0 min 0 sec 0 usec 0 see Time utc year month 1 day 1 hour 0 min 0 sec 0 usec Time local year month 1 day 1 hour 0 min 0 sec 0 usec 0 Time mktime year month 1 day 1 hour 0 min 0 sec 0 usec 0 Creates a