module Oid::Components::View::Helper

Direct including types

Defined in:

Instance Method Summary

Instance Method Detail

def add_component_view : Entitas::Entity #

Add a Oid::Components::View to the entity. Returns self to allow chainables

entity.add_component_view

def add_component_view(**args) : Entitas::Entity #

Add a Oid::Components::View to the entity. Returns self to allow chainables

entity.add_component_view

def add_view(value : Oid::Controller::View) : Entitas::Entity #

Add a Oid::Components::View to the entity. Returns self to allow chainables

entity.add_view(1)

def del_component_view : Entitas::Entity #

Delete Oid::Components::View from the entity. Returns self to allow chainables

entity.del_view
entity.view # => nil

def del_view : Entitas::Entity #

Delete Oid::Components::View from the entity. Returns self to allow chainables

entity.del_view
entity.view # => nil

def get_component_view : Oid::Components::View #

Will return the component that is a Oid::Components::View or raise


def has_component_view? : Bool #

Will return true if the entity has an component Oid::Components::View or false if it does not


def has_view? : Bool #

Will return true if the entity has an component Oid::Components::View or false if it does not


def remove_component_view #

Append. Alias for #del_component_view


def remove_view #

Append. Alias for #del_view


def replace_component_view(component : Oid::Components::View) #

Append. Alias for #replace_view


def replace_component_view(**args) #

Will replace the current component with the new one generated from the provided arguments

entity.replace_view
entity.get_view # => (new_comp)

def replace_view(component : Oid::Components::View) #

Will replace the current component with the new one provided

entity.replace_component_view(new_comp)
entity.get_view # => (new_comp)

def replace_view(value : Oid::Controller::View) #

Will replace the current component with the new one generated from the provided arguments

entity.replace_view(value: 1)
entity.get_view # => (new_comp)

or

entity.replace_view(1)
entity.get_view # => (new_comp)

Will return the component that is a Oid::Components::View or raise


def view? : Bool #

Alias. See #has_view?