Module: Openable

Included in:
Container, Door, Lockable
Defined in:
lib/gamefic-standard/modules/openable.rb

Overview

A module for entities that are openable.

Instance Method Summary collapse

Instance Method Details

#accessible?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/gamefic-standard/modules/openable.rb', line 16

def accessible?
  open?
end

#closed?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/gamefic-standard/modules/openable.rb', line 12

def closed?
  !open?
end

#open=(bool) ⇒ Object



4
5
6
# File 'lib/gamefic-standard/modules/openable.rb', line 4

def open= bool
  @open = bool
end

#open?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/gamefic-standard/modules/openable.rb', line 8

def open?
  @open ||= false
end