Sha256: 54a67f7a24025f4c307bf263976d74ac62be58d4ada283053dc923c7c9d630ce

Contents?: true

Size: 576 Bytes

Versions: 2

Compression:

Stored size: 576 Bytes

Contents

require 'moblues/generator/base'

module Moblues
  module Generator
    class Human < Base
      def generate(entity)
        write_header(entity) unless File.exists?(header_file(entity))
        write_implementation(entity) unless File.exists?(implementation_file(entity))
      end

      private
      def format_name(entity, extension)
        "#{entity.name}.#{extension}"
      end

      def header_template
        file_template('human_header.h')
      end

      def implementation_template
        file_template('human_implementation.m')
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
moblues-0.1.0 lib/moblues/generator/human.rb
moblues-0.0.1 lib/moblues/generator/human.rb