Class: Benry::CmdApp::BaseMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/benry/cmdapp.rb

Direct Known Subclasses

ActionMetadata, AliasMetadata

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, desc, tag: nil, important: nil, hidden: nil) ⇒ BaseMetadata

Returns a new instance of BaseMetadata.



246
247
248
249
250
251
252
# File 'lib/benry/cmdapp.rb', line 246

def initialize(name, desc, tag: nil, important: nil, hidden: nil)
  @name      = name
  @desc      = desc
  @tag       = tag        if nil != tag
  @important = important  if nil != important
  @hidden    = hidden     if nil != hidden
end

Instance Attribute Details

#descObject (readonly)

Returns the value of attribute desc.



254
255
256
# File 'lib/benry/cmdapp.rb', line 254

def desc
  @desc
end

#hiddenObject (readonly) Also known as: hidden?

Returns the value of attribute hidden.



254
255
256
# File 'lib/benry/cmdapp.rb', line 254

def hidden
  @hidden
end

#importantObject (readonly) Also known as: important?

Returns the value of attribute important.



254
255
256
# File 'lib/benry/cmdapp.rb', line 254

def important
  @important
end

#nameObject (readonly)

Returns the value of attribute name.



254
255
256
# File 'lib/benry/cmdapp.rb', line 254

def name
  @name
end

#tagObject (readonly)

Returns the value of attribute tag.



254
255
256
# File 'lib/benry/cmdapp.rb', line 254

def tag
  @tag
end

Instance Method Details

#alias?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


258
259
260
# File 'lib/benry/cmdapp.rb', line 258

def alias?()
  raise NotImplementedError.new("#{self.class.name}#alias?(): not implemented yet.")
end