class Daj

Main class

Attributes

kind[RW]

Public Class Methods

new(data = nil) click to toggle source

Constructor

# File lib/ruby-daj/daj.rb, line 7
def initialize(data = nil)
  @data = data
end

Public Instance Methods

<(filename) click to toggle source

Less than operator as read file

# File lib/ruby-daj/daj.rb, line 12
def <(filename)
  ext = kind || extension(filename)
  Reader.new.read(ext, filename)
end
>(filename) click to toggle source
# File lib/ruby-daj/daj.rb, line 17
def >(filename)
  ext = kind || extension(filename)
  Writer.new(@data).write(ext, filename)
end