Class: Nginxbrew::Local::Ngx

Inherits:
Object
  • Object
show all
Defined in:
lib/nginxbrew/local.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Ngx

Returns a new instance of Ngx.



11
12
13
14
15
# File 'lib/nginxbrew/local.rb', line 11

def initialize(opts={})
    @is_openresty = opts[:is_openresty]
    @raw_version = opts[:raw_version]
    @version = opts[:version]
end

Instance Attribute Details

#is_openrestyObject (readonly)

Returns the value of attribute is_openresty.



9
10
11
# File 'lib/nginxbrew/local.rb', line 9

def is_openresty
  @is_openresty
end

#raw_versionObject (readonly)

Returns the value of attribute raw_version.



9
10
11
# File 'lib/nginxbrew/local.rb', line 9

def raw_version
  @raw_version
end

#versionObject (readonly)

Returns the value of attribute version.



9
10
11
# File 'lib/nginxbrew/local.rb', line 9

def version
  @version
end

Instance Method Details

#is?(version) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/nginxbrew/local.rb', line 17

def is?(version)
    @version == version
end

#nameObject



25
26
27
# File 'lib/nginxbrew/local.rb', line 25

def name
    @version
end

#openresty?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/nginxbrew/local.rb', line 21

def openresty?
    @is_openresty
end