Class: CouchShell::CommandInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/couch-shell/plugin.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ CommandInfo

Returns a new instance of CommandInfo.



49
50
51
52
53
54
55
56
57
# File 'lib/couch-shell/plugin.rb', line 49

def initialize(opts)
  @name = opts[:name] or raise "name required"
  @tags = [@name].concat(opts[:tags] || [])
  @synopsis = opts[:synopsis]
  @doc_line = opts[:doc_line] or raise "doc_line required"
  @doc_text = opts[:doc_text]
  @execute_message = opts[:execute_message] or raise "execute_message required"
  @plugin = opts[:plugin] or raise "plugin required"
end

Instance Attribute Details

#doc_lineObject (readonly)

Returns the value of attribute doc_line.



44
45
46
# File 'lib/couch-shell/plugin.rb', line 44

def doc_line
  @doc_line
end

#doc_textObject (readonly)

Returns the value of attribute doc_text.



45
46
47
# File 'lib/couch-shell/plugin.rb', line 45

def doc_text
  @doc_text
end

#execute_messageObject (readonly)

Returns the value of attribute execute_message.



46
47
48
# File 'lib/couch-shell/plugin.rb', line 46

def execute_message
  @execute_message
end

#nameObject (readonly)

Returns the value of attribute name.



41
42
43
# File 'lib/couch-shell/plugin.rb', line 41

def name
  @name
end

#pluginObject (readonly)

Returns the value of attribute plugin.



47
48
49
# File 'lib/couch-shell/plugin.rb', line 47

def plugin
  @plugin
end

#synopsisObject (readonly)

Returns the value of attribute synopsis.



43
44
45
# File 'lib/couch-shell/plugin.rb', line 43

def synopsis
  @synopsis
end

#tagsObject (readonly)

Returns the value of attribute tags.



42
43
44
# File 'lib/couch-shell/plugin.rb', line 42

def tags
  @tags
end