Sha256: 3c587d954cfe45e431c9f25bd802461bdbc8ec72d1aa5ace17b27156ed98220a

Contents?: true

Size: 505 Bytes

Versions: 2

Compression:

Stored size: 505 Bytes

Contents

# encoding: utf-8

module AfrLoad
  class TvProgram
    attr_accessor :on_air_date,
      :on_air_start, :on_air_end,
      :title_ja, :title,
      :released_year, :released_country,
      :movie_director,
      :leading_actor, :supporting_actor

    def initialize()
      yield(self) if block_given?
    end

    def show()
      instance_variables.each do |var|
        k = var.to_s.tr("@","")
        v = instance_variable_get(var)
        print "#{k}: #{v}, "
      end
      puts
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
afr_load-0.1.8 lib/afr_load/tv_program.rb
afr_load-0.1.7 lib/afr_load/tv_program.rb