Class: Herve::CLI::RubyCommands::List::Entry

Inherits:
Data
  • Object
show all
Defined in:
lib/herve/cli/ruby_commands/list.rb

Overview

Ruby entry: Ruby + metadata

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#activeObject (readonly)

Returns the value of attribute active

Returns:

  • (Object)

    the current value of active



29
30
31
# File 'lib/herve/cli/ruby_commands/list.rb', line 29

def active
  @active
end

#detailsObject (readonly)

Returns the value of attribute details

Returns:

  • (Object)

    the current value of details



29
30
31
# File 'lib/herve/cli/ruby_commands/list.rb', line 29

def details
  @details
end

#installedObject (readonly)

Returns the value of attribute installed

Returns:

  • (Object)

    the current value of installed



29
30
31
# File 'lib/herve/cli/ruby_commands/list.rb', line 29

def installed
  @installed
end

Instance Method Details

#to_json(state = nil) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/herve/cli/ruby_commands/list.rb', line 30

def to_json(state = nil, *)
  hsh = {
    installed: installed,
    active: active,
    details: details
  }
  JSON::State.from_state(state).generate(hsh)
end