Class: Vedeu::Null::Interface

Inherits:
Object
  • Object
show all
Defined in:
lib/vedeu/null/interface.rb

Overview

Provides a non-existent model to swallow messages.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil) ⇒ Vedeu::Null::Interface

Parameters:

  • name (String) (defaults to: nil)


10
11
12
# File 'lib/vedeu/null/interface.rb', line 10

def initialize(name = nil)
  @name = name
end

Instance Attribute Details

#nameString (readonly, protected)

Returns:

  • (String)


46
47
48
# File 'lib/vedeu/null/interface.rb', line 46

def name
  @name
end

Instance Method Details

#attributesHash<Symbol => String>

Returns:

  • (Hash<Symbol => String>)


15
16
17
18
19
# File 'lib/vedeu/null/interface.rb', line 15

def attributes
  {
    name: name,
  }
end

#storeVedeu::Null::Interface

Pretend to store this model in the repository.



24
25
26
# File 'lib/vedeu/null/interface.rb', line 24

def store
  self
end

#visible=FalseClass

Override the visible= setter usually found on a Vedeu::Interface.

Returns:

  • (FalseClass)


38
39
40
# File 'lib/vedeu/null/interface.rb', line 38

def visible=(*)
  false
end

#visible?FalseClass

The null interface should not be visible.

Returns:

  • (FalseClass)


31
32
33
# File 'lib/vedeu/null/interface.rb', line 31

def visible?
  false
end