Sha256: 51efd830e51bfad92938b27aa469e8ec4523120b2c446a391b71010becbd3ba8

Contents?: true

Size: 554 Bytes

Versions: 2

Compression:

Stored size: 554 Bytes

Contents

require "flutterby/version"
require "flutterby/entity"
require "flutterby/file"
require "flutterby/folder"
require "flutterby/filters"
require "flutterby/view"
require "flutterby/server"


module Flutterby
  def Flutterby.from(fs_path, name: nil, parent: nil)
    name ||= ::File.basename(fs_path)

    if ::File.directory?(fs_path)
      Folder.new(name, fs_path: fs_path, parent: parent)
    elsif ::File.file?(fs_path)
      File.new(name, fs_path: fs_path, parent: parent)
    else
      raise "Path #{fs_path} could not be found."
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flutterby-0.0.10 lib/flutterby.rb
flutterby-0.0.9 lib/flutterby.rb